aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-06-25 15:54:51 -0700
committerGarrett D'Amore <garrett@damore.org>2017-06-25 15:54:51 -0700
commit40e8d55fb32a04a4ef63e329d12a91b4a223b894 (patch)
treedee3b7914aa0668c89c55dda6d57f6d12e427885 /tests
parent9f762db90aefdc95839707013a89ca3680ad3f34 (diff)
downloadnng-40e8d55fb32a04a4ef63e329d12a91b4a223b894.tar.gz
nng-40e8d55fb32a04a4ef63e329d12a91b4a223b894.tar.bz2
nng-40e8d55fb32a04a4ef63e329d12a91b4a223b894.zip
Device can take a little while to set up, and this can result in lost msgs.
Diffstat (limited to 'tests')
-rw-r--r--tests/compat_device.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/compat_device.c b/tests/compat_device.c
index b83e4f82..e04839ef 100644
--- a/tests/compat_device.c
+++ b/tests/compat_device.c
@@ -106,7 +106,7 @@ int main()
endb = test_socket(AF_SP, NN_PAIR);
test_connect(endb, SOCKET_ADDRESS_B);
- nn_sleep(200);
+ nn_sleep(100);
/* Pass a pair of messages between endpoints. */
test_send(enda, "ABC");
@@ -125,13 +125,14 @@ int main()
/* Start the device. */
nn_thread_init(&thread2, device2, NULL);
+ nn_sleep(100);
+
/* Create two sockets to connect to the device. */
endc = test_socket(AF_SP, NN_PUSH);
test_connect(endc, SOCKET_ADDRESS_C);
endd = test_socket(AF_SP, NN_PULL);
test_connect(endd, SOCKET_ADDRESS_D);
- nn_sleep(100);
/* Pass a message between endpoints. */
test_send(endc, "XYZ");