summaryrefslogtreecommitdiff
path: root/auto_tests/conference_double_invite_test.c
diff options
context:
space:
mode:
authorzugz (tox) <mbays+tox@sdf.org>2018-08-17 20:34:25 +0200
committerzugz (tox) <mbays+tox@sdf.org>2018-08-31 17:08:35 +0200
commit9764285ab156c25050b9e9e46a8e8bc0be701951 (patch)
treee4e608c75a36382fe84dcdfc03d8135f48aea655 /auto_tests/conference_double_invite_test.c
parent2e4cae692e0895ce17e67fb2e1fd899c91fcb675 (diff)
Use test clock in run_auto_test tests and dht test
Diffstat (limited to 'auto_tests/conference_double_invite_test.c')
-rw-r--r--auto_tests/conference_double_invite_test.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/auto_tests/conference_double_invite_test.c b/auto_tests/conference_double_invite_test.c
index 33026986..36e93bc0 100644
--- a/auto_tests/conference_double_invite_test.c
+++ b/auto_tests/conference_double_invite_test.c
@@ -7,6 +7,8 @@
7 7
8typedef struct State { 8typedef struct State {
9 uint32_t index; 9 uint32_t index;
10 uint64_t clock;
11
10 bool self_online; 12 bool self_online;
11 bool friend_online; 13 bool friend_online;
12 14
@@ -64,10 +66,7 @@ static void conference_double_invite_test(Tox **toxes, State *state)
64 fprintf(stderr, "Waiting for invitation to arrive\n"); 66 fprintf(stderr, "Waiting for invitation to arrive\n");
65 67
66 do { 68 do {
67 tox_iterate(toxes[0], &state[0]); 69 iterate_all_wait(2, toxes, state, ITERATION_INTERVAL);
68 tox_iterate(toxes[1], &state[1]);
69
70 c_sleep(ITERATION_INTERVAL);
71 } while (!state[0].joined || !state[1].joined); 70 } while (!state[0].joined || !state[1].joined);
72 71
73 fprintf(stderr, "Invitations accepted\n"); 72 fprintf(stderr, "Invitations accepted\n");
@@ -75,8 +74,7 @@ static void conference_double_invite_test(Tox **toxes, State *state)
75 // Invite one more time, resulting in friend -1 inviting tox1 (toxes[1]). 74 // Invite one more time, resulting in friend -1 inviting tox1 (toxes[1]).
76 tox_conference_invite(toxes[0], 0, state[0].conference, nullptr); 75 tox_conference_invite(toxes[0], 0, state[0].conference, nullptr);
77 76
78 tox_iterate(toxes[0], &state[0]); 77 iterate_all_wait(2, toxes, state, ITERATION_INTERVAL);
79 tox_iterate(toxes[1], &state[1]);
80} 78}
81 79
82int main(void) 80int main(void)