diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-09-25 13:34:37 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-09-25 13:34:37 +0000 |
commit | d89d2c881cead94a93f13e39dbd7a72bd4574cd5 (patch) | |
tree | f9b1206ab4e4b61557652bcd31922f96a21f1f73 /src/ats | |
parent | c693a7971e04fa8ab7eb7ec1b99a95279254d68e (diff) | |
download | gnunet-d89d2c881cead94a93f13e39dbd7a72bd4574cd5.tar.gz gnunet-d89d2c881cead94a93f13e39dbd7a72bd4574cd5.zip |
modifications to test
Diffstat (limited to 'src/ats')
-rw-r--r-- | src/ats/test_ats_api_scheduling_add_address.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/ats/test_ats_api_scheduling_add_address.c b/src/ats/test_ats_api_scheduling_add_address.c index 21bf14102..4ce070e1e 100644 --- a/src/ats/test_ats_api_scheduling_add_address.c +++ b/src/ats/test_ats_api_scheduling_add_address.c | |||
@@ -29,8 +29,14 @@ | |||
29 | #include "ats.h" | 29 | #include "ats.h" |
30 | #include "test_ats_api_common.h" | 30 | #include "test_ats_api_common.h" |
31 | 31 | ||
32 | /** | ||
33 | * Timeout task | ||
34 | */ | ||
32 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 35 | static GNUNET_SCHEDULER_TaskIdentifier die_task; |
33 | 36 | ||
37 | /** | ||
38 | * Statistics handle | ||
39 | */ | ||
34 | struct GNUNET_STATISTICS_Handle *stats; | 40 | struct GNUNET_STATISTICS_Handle *stats; |
35 | 41 | ||
36 | /** | 42 | /** |
@@ -137,7 +143,9 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address, | |||
137 | const struct GNUNET_ATS_Information *atsi, | 143 | const struct GNUNET_ATS_Information *atsi, |
138 | uint32_t ats_count) | 144 | uint32_t ats_count) |
139 | { | 145 | { |
140 | 146 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Did not expect suggestion callback!\n"); | |
147 | GNUNET_SCHEDULER_add_now (&end_badly, NULL); | ||
148 | return; | ||
141 | } | 149 | } |
142 | 150 | ||
143 | 151 | ||
@@ -156,8 +164,7 @@ run (void *cls, | |||
156 | if (sched_ats == NULL) | 164 | if (sched_ats == NULL) |
157 | { | 165 | { |
158 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Could not connect to ATS scheduling!\n"); | 166 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Could not connect to ATS scheduling!\n"); |
159 | ret = 1; | 167 | GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
160 | GNUNET_SCHEDULER_add_now (&end, NULL); | ||
161 | return; | 168 | return; |
162 | } | 169 | } |
163 | 170 | ||
@@ -165,8 +172,7 @@ run (void *cls, | |||
165 | if (GNUNET_SYSERR == GNUNET_CRYPTO_hash_from_string(PEERID0, &p.id.hashPubKey)) | 172 | if (GNUNET_SYSERR == GNUNET_CRYPTO_hash_from_string(PEERID0, &p.id.hashPubKey)) |
166 | { | 173 | { |
167 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Could not setup peer!\n"); | 174 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Could not setup peer!\n"); |
168 | ret = GNUNET_SYSERR; | 175 | GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
169 | GNUNET_SCHEDULER_add_now (&end, NULL); | ||
170 | return; | 176 | return; |
171 | } | 177 | } |
172 | GNUNET_assert (0 == strcmp (PEERID0, GNUNET_i2s_full (&p.id))); | 178 | GNUNET_assert (0 == strcmp (PEERID0, GNUNET_i2s_full (&p.id))); |
@@ -198,7 +204,7 @@ int | |||
198 | main (int argc, char *argv[]) | 204 | main (int argc, char *argv[]) |
199 | { | 205 | { |
200 | ret = 0; | 206 | ret = 0; |
201 | if (0 != GNUNET_TESTING_peer_run ("test_ats_api_scheduling_add_address", | 207 | if (0 != GNUNET_TESTING_peer_run ("test-ats-api", |
202 | "test_ats_api.conf", | 208 | "test_ats_api.conf", |
203 | &run, NULL)) | 209 | &run, NULL)) |
204 | return 1; | 210 | return 1; |