aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-08-24 16:47:29 -0700
committerGarrett D'Amore <garrett@damore.org>2017-08-24 16:47:29 -0700
commitde15e4c49bab1a879feab57825d8588c7af87ed5 (patch)
tree217d844c48a256ac345c0422793d4af1c79dd7f9 /tests
parent2e5f47aed81992a8dba4b27823894507794fc0ad (diff)
downloadnng-de15e4c49bab1a879feab57825d8588c7af87ed5.tar.gz
nng-de15e4c49bab1a879feab57825d8588c7af87ed5.tar.bz2
nng-de15e4c49bab1a879feab57825d8588c7af87ed5.zip
A few more sleeps for connection establishment.
Diffstat (limited to 'tests')
-rw-r--r--tests/pair1.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/pair1.c b/tests/pair1.c
index 7b26702b..a78fde49 100644
--- a/tests/pair1.c
+++ b/tests/pair1.c
@@ -71,6 +71,7 @@ TestMain("PAIRv1 protocol", {
So(nng_listen(s1, addr, NULL, 0) == 0);
So(nng_dial(c1, addr, NULL, 0) == 0);
+ nng_usleep(20000);
So(nng_msg_alloc(&msg, 0) == 0);
APPENDSTR(msg, "ALPHA");
@@ -132,6 +133,7 @@ TestMain("PAIRv1 protocol", {
So(nng_listen(s1, addr, NULL, 0) == 0);
So(nng_dial(c1, addr, NULL, 0) == 0);
+ nng_usleep(20000);
for (i = 0, rv = 0; i < 10; i++) {
So(nng_msg_alloc(&msg, 0) == 0);
@@ -157,6 +159,7 @@ TestMain("PAIRv1 protocol", {
So(nng_listen(s1, addr, NULL, 0) == 0);
So(nng_dial(c1, addr, NULL, 0) == 0);
+ nng_usleep(20000);
// We choose to allow some buffering. In reality the
// buffer size is just 1, and we will fail after 2.
@@ -190,6 +193,7 @@ TestMain("PAIRv1 protocol", {
So(nng_listen(s1, addr, NULL, 0) == 0);
So(nng_dial(c1, addr, NULL, 0) == 0);
+ nng_usleep(20000);
Convey("Send/recv work", {
So(nng_msg_alloc(&msg, 0) == 0);
@@ -356,6 +360,7 @@ TestMain("PAIRv1 protocol", {
So(nng_listen(s1, addr, NULL, 0) == 0);
So(nng_dial(c1, addr, NULL, 0) == 0);
So(nng_dial(c2, addr, NULL, 0) == 0);
+ nng_usleep(20000);
So(nng_msg_alloc(&msg, 0) == 0);
APPENDSTR(msg, "ONE");
@@ -412,6 +417,7 @@ TestMain("PAIRv1 protocol", {
So(nng_dial(c1, addr, NULL, 0) == 0);
nng_usleep(100000);
So(nng_dial(c2, addr, NULL, 0) == 0);
+ nng_usleep(20000);
So(nng_msg_alloc(&msg, 0) == 0);
APPENDSTR(msg, "YES");
@@ -453,6 +459,7 @@ TestMain("PAIRv1 protocol", {
So(nng_listen(s1, addr, NULL, 0) == 0);
So(nng_dial(c1, addr, NULL, 0) == 0);
So(nng_dial(c2, addr, NULL, 0) == 0);
+ nng_usleep(20000);
Convey("Send/recv works", {
So(nng_msg_alloc(&msg, 0) == 0);