From de15e4c49bab1a879feab57825d8588c7af87ed5 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 24 Aug 2017 16:47:29 -0700 Subject: A few more sleeps for connection establishment. --- tests/pair1.c | 7 +++++++ 1 file changed, 7 insertions(+) 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); -- cgit v1.2.3-70-g09d2