diff options
author | wachs <wachs@140774ce-b5e7-0310-ab8b-a85725594a96> | 2013-01-11 13:37:47 +0000 |
---|---|---|
committer | wachs <wachs@140774ce-b5e7-0310-ab8b-a85725594a96> | 2013-01-11 13:37:47 +0000 |
commit | e2b6a307ad27f1e37836e0c8afdc2200f14cde66 (patch) | |
tree | b30205a9021935da4c612c22fc4b0c6cf5b803ab /src | |
parent | 952173c89d2d04b6dba51272a12afad0b53f4c75 (diff) |
change to test to let updates settle
git-svn-id: https://gnunet.org/svn/gnunet@25757 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src')
-rw-r--r-- | src/ats/test_ats_simplistic_change_preference.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ats/test_ats_simplistic_change_preference.c b/src/ats/test_ats_simplistic_change_preference.c index f004385d18..5adf87c755 100644 --- a/src/ats/test_ats_simplistic_change_preference.c +++ b/src/ats/test_ats_simplistic_change_preference.c @@ -38,6 +38,8 @@ #define DEBUG_ATS_INFO GNUNET_NO +#define SLEEP GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) + static GNUNET_SCHEDULER_TaskIdentifier die_task; /** @@ -197,6 +199,12 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address, } static void +sleep_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) +{ + GNUNET_ATS_suggest_address (sched_ats, &p[0].id); +} + +static void run (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg, struct GNUNET_TESTING_Peer *peer) @@ -332,7 +340,7 @@ run (void *cls, GNUNET_ATS_change_preference (perf_ats, &p[1].id, GNUNET_ATS_PREFERENCE_LATENCY,(double) 100, GNUNET_ATS_PREFERENCE_END); - GNUNET_ATS_suggest_address (sched_ats, &p[0].id); + GNUNET_SCHEDULER_add_delayed (SLEEP, &sleep_task, NULL); } |