diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-08-03 09:06:44 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-08-03 09:06:44 +0000 |
commit | c77ee3b95455fc2974edebc8e02db5d30be87d22 (patch) | |
tree | 29fe839ecd58d321f786c789b778911bc94bba0d /src/datastore/test_datastore_api_management.c | |
parent | 89c5d0047e261ed7e5fabb2e771123f1707e4670 (diff) | |
download | gnunet-c77ee3b95455fc2974edebc8e02db5d30be87d22.tar.gz gnunet-c77ee3b95455fc2974edebc8e02db5d30be87d22.zip |
-cleaning up test logic, modernizing calls, improving test documentation
Diffstat (limited to 'src/datastore/test_datastore_api_management.c')
-rw-r--r-- | src/datastore/test_datastore_api_management.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/datastore/test_datastore_api_management.c b/src/datastore/test_datastore_api_management.c index e46f094f4..4b888d468 100644 --- a/src/datastore/test_datastore_api_management.c +++ b/src/datastore/test_datastore_api_management.c | |||
@@ -132,8 +132,7 @@ check_success (void *cls, int success, struct GNUNET_TIME_Absolute min_expiratio | |||
132 | GNUNET_assert (GNUNET_OK == success); | 132 | GNUNET_assert (GNUNET_OK == success); |
133 | GNUNET_free_non_null (crc->data); | 133 | GNUNET_free_non_null (crc->data); |
134 | crc->data = NULL; | 134 | crc->data = NULL; |
135 | GNUNET_SCHEDULER_add_continuation (&run_continuation, crc, | 135 | GNUNET_SCHEDULER_add_now (&run_continuation, crc); |
136 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | ||
137 | } | 136 | } |
138 | 137 | ||
139 | 138 | ||
@@ -149,8 +148,7 @@ check_value (void *cls, const struct GNUNET_HashCode * key, size_t size, | |||
149 | if (NULL == key) | 148 | if (NULL == key) |
150 | { | 149 | { |
151 | crc->phase = RP_GET_FAIL; | 150 | crc->phase = RP_GET_FAIL; |
152 | GNUNET_SCHEDULER_add_continuation (&run_continuation, crc, | 151 | GNUNET_SCHEDULER_add_now (&run_continuation, crc); |
153 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | ||
154 | return; | 152 | return; |
155 | } | 153 | } |
156 | i = crc->i; | 154 | i = crc->i; |
@@ -164,8 +162,7 @@ check_value (void *cls, const struct GNUNET_HashCode * key, size_t size, | |||
164 | crc->i--; | 162 | crc->i--; |
165 | if (crc->i == 0) | 163 | if (crc->i == 0) |
166 | crc->phase = RP_DONE; | 164 | crc->phase = RP_DONE; |
167 | GNUNET_SCHEDULER_add_continuation (&run_continuation, crc, | 165 | GNUNET_SCHEDULER_add_now (&run_continuation, crc); |
168 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | ||
169 | } | 166 | } |
170 | 167 | ||
171 | 168 | ||
@@ -180,8 +177,7 @@ check_nothing (void *cls, const struct GNUNET_HashCode * key, size_t size, | |||
180 | GNUNET_assert (key == NULL); | 177 | GNUNET_assert (key == NULL); |
181 | if (0 == --crc->i) | 178 | if (0 == --crc->i) |
182 | crc->phase = RP_DONE; | 179 | crc->phase = RP_DONE; |
183 | GNUNET_SCHEDULER_add_continuation (&run_continuation, crc, | 180 | GNUNET_SCHEDULER_add_now (&run_continuation, crc); |
184 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | ||
185 | } | 181 | } |
186 | 182 | ||
187 | 183 | ||
@@ -252,8 +248,7 @@ run_tests (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, c | |||
252 | GNUNET_free (crc); | 248 | GNUNET_free (crc); |
253 | return; | 249 | return; |
254 | } | 250 | } |
255 | GNUNET_SCHEDULER_add_continuation (&run_continuation, crc, | 251 | GNUNET_SCHEDULER_add_now (&run_continuation, crc); |
256 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | ||
257 | } | 252 | } |
258 | 253 | ||
259 | 254 | ||