diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-08-28 11:54:38 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-08-28 11:54:38 -0700 |
| commit | 8d67f64a975db7439bf42baf0d0835a32ce88069 (patch) | |
| tree | 98d81af87f388c428e42b88fffffaa9702c7aebb /tests/pair1.c | |
| parent | 204f7574126b4c988aafb4c93c0370f622869ace (diff) | |
| download | nng-8d67f64a975db7439bf42baf0d0835a32ce88069.tar.gz nng-8d67f64a975db7439bf42baf0d0835a32ce88069.tar.bz2 nng-8d67f64a975db7439bf42baf0d0835a32ce88069.zip | |
Reorganize reset so it only takes place after creating sockets.
Eliminate a stupid delay.
Diffstat (limited to 'tests/pair1.c')
| -rw-r--r-- | tests/pair1.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/pair1.c b/tests/pair1.c index a78fde49..ba13d494 100644 --- a/tests/pair1.c +++ b/tests/pair1.c @@ -32,13 +32,7 @@ TestMain("PAIRv1 protocol", { uint32_t v; size_t sz; - Reset({ - nng_close(s1); - nng_close(c1); - nng_close(c2); - nng_usleep(10000); - nng_fini(); - }); + atexit(nng_fini); Convey("Given a few sockets", { trantest_next_address(addr, templ); @@ -46,6 +40,12 @@ TestMain("PAIRv1 protocol", { So(nng_pair1_open(&c1) == 0); So(nng_pair1_open(&c2) == 0); + Reset({ + nng_close(s1); + nng_close(c1); + nng_close(c2); + }); + tmo = 300000; So(nng_setopt_usec(s1, nng_optid_recvtimeo, tmo) == 0); So(nng_setopt_usec(c1, nng_optid_recvtimeo, tmo) == 0); |
