diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2012-03-19 08:25:03 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2012-03-20 07:12:27 +0100 |
commit | ceb8044c602d14096b9e49907eea060b25edb934 (patch) | |
tree | 0f8fe3c69bce897013f8b27f2d4902fbf56b1402 | |
parent | 11493ab8cfd302d1543f5b1f938000e08fd60aa7 (diff) |
Reconnect test fixed
Reconnect test have run TCP reconnect test twice instead of
doing one test for TCP and one for IPC. Fixed.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
-rw-r--r-- | tests/reconnect.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/reconnect.cpp b/tests/reconnect.cpp index af8eda4..c677527 100644 --- a/tests/reconnect.cpp +++ b/tests/reconnect.cpp @@ -54,6 +54,8 @@ int XS_TEST_MAIN () rc = xs_close (pull); assert (rc == 0); +#if !defined XS_HAVE_WINDOWS && !defined XS_HAVE_OPENVMS + // Now, let's test the same scenario with IPC. push = xs_socket (ctx, XS_PUSH); assert (push); @@ -61,7 +63,7 @@ int XS_TEST_MAIN () assert (push); // Connect before bind was done at the peer and send one message. - rc = xs_connect (push, "tcp://127.0.0.1:5560"); + rc = xs_connect (push, "ipc:///tmp/tester"); assert (rc == 0); rc = xs_send (push, "ABC", 3, 0); assert (rc == 3); @@ -70,7 +72,7 @@ int XS_TEST_MAIN () sleep (1); // Bind the peer and get the message. - rc = xs_bind (pull, "tcp://127.0.0.1:5560"); + rc = xs_bind (pull, "ipc:///tmp/tester"); assert (rc == 0); rc = xs_recv (pull, buf, sizeof (buf), 0); assert (rc == 3); @@ -80,6 +82,9 @@ int XS_TEST_MAIN () assert (rc == 0); rc = xs_close (pull); assert (rc == 0); + +#endif + rc = xs_term (ctx); assert (rc == 0); |