aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/reqrep.c6
-rw-r--r--tests/sock.c6
2 files changed, 5 insertions, 7 deletions
diff --git a/tests/reqrep.c b/tests/reqrep.c
index 52269711..d4040bdb 100644
--- a/tests/reqrep.c
+++ b/tests/reqrep.c
@@ -133,19 +133,17 @@ Main({
So(nng_msg_alloc(&def, 0) == 0);
So(nng_msg_append(def, "def", 4) == 0);
+ So(nng_listen(rep, addr, NULL, NNG_FLAG_SYNCH) == 0);
So(nng_dial(req, addr, NULL, 0) == 0);
So(nng_sendmsg(req, abc, 0) == 0);
So(nng_sendmsg(req, def, 0) == 0);
-
- So(nng_listen(rep, addr, NULL, NNG_FLAG_SYNCH) == 0);
-
So(nng_recvmsg(rep, &cmd, 0) == 0);
So(cmd != NULL);
+
So(nng_sendmsg(rep, cmd, 0) == 0);
So(nng_recvmsg(rep, &cmd, 0) == 0);
So(nng_sendmsg(rep, cmd, 0) == 0);
-
So(nng_recvmsg(req, &cmd, 0) == 0);
So(nng_msg_len(cmd) == 4);
diff --git a/tests/sock.c b/tests/sock.c
index c43b6fc1..6c6d5b06 100644
--- a/tests/sock.c
+++ b/tests/sock.c
@@ -39,7 +39,7 @@ Main({
Convey("Recv with no pipes times out correctly", {
nng_msg *msg = NULL;
- int64_t when = 500000;
+ int64_t when = 100000;
uint64_t now;
now = nni_clock();
@@ -63,7 +63,7 @@ Main({
Convey("Send with no pipes times out correctly", {
nng_msg *msg = NULL;
- int64_t when = 500000;
+ int64_t when = 100000;
uint64_t now;
// We cheat to get access to the core's clock.
@@ -168,7 +168,7 @@ Main({
So(nng_setopt(sock2, NNG_OPT_RCVTIMEO, &second, sizeof (second)) == 0);
So(nng_listen(sock, "inproc://test1", NULL, NNG_FLAG_SYNCH) == 0);
- So(nng_dial(sock2, "inproc://test1", NULL, 0) == 0);
+ So(nng_dial(sock2, "inproc://test1", NULL, NNG_FLAG_SYNCH) == 0);
So(nng_send(sock, "abc", 4, 0) == 0);
So(nng_recv(sock2 , &buf, &sz, NNG_FLAG_ALLOC) == 0);