diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-06-25 15:48:44 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-06-25 15:48:44 -0700 |
| commit | 9f762db90aefdc95839707013a89ca3680ad3f34 (patch) | |
| tree | 0fe5581a46a37a96f3f29abea1be96caeac8aeb0 /tests/reqrep.c | |
| parent | baba9825f11aa6759fccecbf92b4d25fb41be5ec (diff) | |
| download | nng-9f762db90aefdc95839707013a89ca3680ad3f34.tar.gz nng-9f762db90aefdc95839707013a89ca3680ad3f34.tar.bz2 nng-9f762db90aefdc95839707013a89ca3680ad3f34.zip | |
Make reqrep test more robust; sock test faster.
Diffstat (limited to 'tests/reqrep.c')
| -rw-r--r-- | tests/reqrep.c | 6 |
1 files changed, 2 insertions, 4 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); |
