diff options
author | zugz (tox) <mbays+tox@sdf.org> | 2018-08-17 20:34:25 +0200 |
---|---|---|
committer | zugz (tox) <mbays+tox@sdf.org> | 2018-08-31 17:08:35 +0200 |
commit | 9764285ab156c25050b9e9e46a8e8bc0be701951 (patch) | |
tree | e4e608c75a36382fe84dcdfc03d8135f48aea655 /auto_tests/lossy_packet_test.c | |
parent | 2e4cae692e0895ce17e67fb2e1fd899c91fcb675 (diff) |
Use test clock in run_auto_test tests and dht test
Diffstat (limited to 'auto_tests/lossy_packet_test.c')
-rw-r--r-- | auto_tests/lossy_packet_test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/auto_tests/lossy_packet_test.c b/auto_tests/lossy_packet_test.c index 51081a39..10d4e505 100644 --- a/auto_tests/lossy_packet_test.c +++ b/auto_tests/lossy_packet_test.c | |||
@@ -16,6 +16,8 @@ | |||
16 | 16 | ||
17 | typedef struct State { | 17 | typedef struct State { |
18 | uint32_t index; | 18 | uint32_t index; |
19 | uint64_t clock; | ||
20 | |||
19 | bool custom_packet_received; | 21 | bool custom_packet_received; |
20 | } State; | 22 | } State; |
21 | 23 | ||
@@ -47,9 +49,7 @@ static void test_lossy_packet(Tox **toxes, State *state) | |||
47 | ck_assert_msg(ret == true, "tox_friend_send_lossy_packet fail %i", ret); | 49 | ck_assert_msg(ret == true, "tox_friend_send_lossy_packet fail %i", ret); |
48 | 50 | ||
49 | do { | 51 | do { |
50 | tox_iterate(toxes[0], nullptr); | 52 | iterate_all_wait(2, toxes, state, ITERATION_INTERVAL); |
51 | tox_iterate(toxes[1], &state[1]); | ||
52 | c_sleep(ITERATION_INTERVAL); | ||
53 | } while (!state[1].custom_packet_received); | 53 | } while (!state[1].custom_packet_received); |
54 | } | 54 | } |
55 | 55 | ||