diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-01-18 18:29:41 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-01-18 18:32:06 -0800 |
| commit | 8049d822b3d8ea8bd11793369004c638d833964e (patch) | |
| tree | d4ebfef8b3b5d80c8693f71ac6cea3ff91dc12ba /tests | |
| parent | 1e4cf4e7c872a705a41bca66dd377ca2dbbe0d69 (diff) | |
| download | nng-8049d822b3d8ea8bd11793369004c638d833964e.tar.gz nng-8049d822b3d8ea8bd11793369004c638d833964e.tar.bz2 nng-8049d822b3d8ea8bd11793369004c638d833964e.zip | |
fixes #12 SURVEY hang in Travis
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/survey.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/survey.c b/tests/survey.c index 3ead961d..7a5929ba 100644 --- a/tests/survey.c +++ b/tests/survey.c @@ -9,6 +9,7 @@ #include "convey.h" #include "nng.h" +#include "core/nng_impl.h" #include <string.h> @@ -44,8 +45,9 @@ Main({ }) Convey("Survey without responder times out", { - uint64_t expire = 1000; + uint64_t expire = 50000; nng_msg *msg; + int rv; So(nng_setopt(surv, NNG_OPT_SURVEYTIME, &expire, sizeof (expire)) == 0); So(nng_msg_alloc(&msg, 0) == 0); @@ -94,7 +96,7 @@ Main({ nng_close(resp); }) - expire = 40000; + expire = 50000; So(nng_setopt(surv, NNG_OPT_SURVEYTIME, &expire, sizeof (expire)) == 0); So(nng_listen(surv, addr, NULL, NNG_FLAG_SYNCH) == 0); @@ -129,7 +131,7 @@ Main({ So(nng_recvmsg(surv, &msg, 0) == NNG_ETIMEDOUT); Convey("And goes to non-survey state", { - rtimeo = 50000; + rtimeo = 200000; So(nng_setopt(surv, NNG_OPT_RCVTIMEO, &rtimeo, sizeof (rtimeo)) == 0); rv = nng_recvmsg(surv, &msg, 0); So(rv== NNG_ESTATE); |
