diff options
Diffstat (limited to 'auto_tests/send_message_test.c')
-rw-r--r-- | auto_tests/send_message_test.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/auto_tests/send_message_test.c b/auto_tests/send_message_test.c index 8857d232..81969d59 100644 --- a/auto_tests/send_message_test.c +++ b/auto_tests/send_message_test.c | |||
@@ -11,6 +11,8 @@ | |||
11 | 11 | ||
12 | typedef struct State { | 12 | typedef struct State { |
13 | uint32_t index; | 13 | uint32_t index; |
14 | uint64_t clock; | ||
15 | |||
14 | bool message_received; | 16 | bool message_received; |
15 | } State; | 17 | } State; |
16 | 18 | ||
@@ -51,10 +53,7 @@ static void send_message_test(Tox **toxes, State *state) | |||
51 | ck_assert_msg(errm == TOX_ERR_FRIEND_SEND_MESSAGE_OK, "TOX_MAX_MESSAGE_LENGTH is too big? error=%d", errm); | 53 | ck_assert_msg(errm == TOX_ERR_FRIEND_SEND_MESSAGE_OK, "TOX_MAX_MESSAGE_LENGTH is too big? error=%d", errm); |
52 | 54 | ||
53 | do { | 55 | do { |
54 | tox_iterate(toxes[0], &state[0]); | 56 | iterate_all_wait(2, toxes, state, ITERATION_INTERVAL); |
55 | tox_iterate(toxes[1], &state[1]); | ||
56 | |||
57 | c_sleep(ITERATION_INTERVAL); | ||
58 | } while (!state[1].message_received); | 57 | } while (!state[1].message_received); |
59 | } | 58 | } |
60 | 59 | ||