mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed tox_test sometimes timing out.
This commit is contained in:
parent
2ea0657a6d
commit
8d50e4a866
|
@ -292,6 +292,12 @@ START_TEST(test_many_clients)
|
||||||
loop_top:
|
loop_top:
|
||||||
pairs[i].tox1 = rand() % NUM_TOXES;
|
pairs[i].tox1 = rand() % NUM_TOXES;
|
||||||
pairs[i].tox2 = (pairs[i].tox1 + rand() % (NUM_TOXES - 1) + 1) % NUM_TOXES;
|
pairs[i].tox2 = (pairs[i].tox1 + rand() % (NUM_TOXES - 1) + 1) % NUM_TOXES;
|
||||||
|
|
||||||
|
for (j = 0; j < i; ++j) {
|
||||||
|
if (pairs[j].tox2 == pairs[i].tox1 && pairs[j].tox1 == pairs[i].tox2)
|
||||||
|
goto loop_top;
|
||||||
|
}
|
||||||
|
|
||||||
tox_get_address(toxes[pairs[i].tox1], address);
|
tox_get_address(toxes[pairs[i].tox1], address);
|
||||||
int test = tox_add_friend(toxes[pairs[i].tox2], address, (uint8_t *)"Gentoo", 7);
|
int test = tox_add_friend(toxes[pairs[i].tox2], address, (uint8_t *)"Gentoo", 7);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user