diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2012-03-13 11:10:33 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2012-03-13 11:10:33 +0100 |
commit | 921da22147e201455837bcd38df1af33aceff26f (patch) | |
tree | e76e001ac65d4fa96ab89468e109db05978b7f70 /tests | |
parent | 224b7c7a816010fc0f781372051ec7c578af42a0 (diff) |
io_threads argument removed from xs_init()
The argument was changed to a context option (XS_IO_THREADS).
0MQ compatibility mode sets the option and ensures that
there's at least one I/O thread present.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/emptyctx.cpp | 2 | ||||
-rw-r--r-- | tests/hwm.cpp | 2 | ||||
-rw-r--r-- | tests/invalid_rep.cpp | 2 | ||||
-rw-r--r-- | tests/linger.cpp | 2 | ||||
-rw-r--r-- | tests/max_sockets.cpp | 2 | ||||
-rw-r--r-- | tests/msg_flags.cpp | 2 | ||||
-rw-r--r-- | tests/pair_inproc.cpp | 2 | ||||
-rw-r--r-- | tests/pair_ipc.cpp | 2 | ||||
-rw-r--r-- | tests/pair_tcp.cpp | 2 | ||||
-rw-r--r-- | tests/polltimeo.cpp | 2 | ||||
-rw-r--r-- | tests/reconnect.cpp | 2 | ||||
-rw-r--r-- | tests/reqrep_device.cpp | 2 | ||||
-rw-r--r-- | tests/reqrep_inproc.cpp | 2 | ||||
-rw-r--r-- | tests/reqrep_ipc.cpp | 2 | ||||
-rw-r--r-- | tests/reqrep_tcp.cpp | 2 | ||||
-rw-r--r-- | tests/shutdown_stress.cpp | 7 | ||||
-rw-r--r-- | tests/sub_forward.cpp | 2 | ||||
-rw-r--r-- | tests/timeo.cpp | 2 |
18 files changed, 23 insertions, 18 deletions
diff --git a/tests/emptyctx.cpp b/tests/emptyctx.cpp index 4208a5a..1448254 100644 --- a/tests/emptyctx.cpp +++ b/tests/emptyctx.cpp @@ -26,7 +26,7 @@ int XS_TEST_MAIN () // This is a very simple test to check whether everything works OK when // context is terminated even before I/O threads were launched. - void *ctx = xs_init (1); + void *ctx = xs_init (); assert (ctx); int rc = xs_term (ctx); assert (rc == 0); diff --git a/tests/hwm.cpp b/tests/hwm.cpp index e3faa6c..f93dcd9 100644 --- a/tests/hwm.cpp +++ b/tests/hwm.cpp @@ -24,7 +24,7 @@ int XS_TEST_MAIN () { fprintf (stderr, "hwm test running...\n"); - void *ctx = xs_init (1); + void *ctx = xs_init (); assert (ctx); // Create pair of socket, each with high watermark of 2. Thus the total diff --git a/tests/invalid_rep.cpp b/tests/invalid_rep.cpp index b2cb976..cd0ad8e 100644 --- a/tests/invalid_rep.cpp +++ b/tests/invalid_rep.cpp @@ -26,7 +26,7 @@ int XS_TEST_MAIN () fprintf (stderr, "invalid_rep test running...\n"); // Create REQ/XREP wiring. - void *ctx = xs_init (1); + void *ctx = xs_init (); assert (ctx); void *xrep_socket = xs_socket (ctx, XS_XREP); assert (xrep_socket); diff --git a/tests/linger.cpp b/tests/linger.cpp index a016496..8300394 100644 --- a/tests/linger.cpp +++ b/tests/linger.cpp @@ -25,7 +25,7 @@ int XS_TEST_MAIN () fprintf (stderr, "linger test running...\n"); // Create socket. - void *ctx = xs_init (1); + void *ctx = xs_init (); assert (ctx); void *s = xs_socket (ctx, XS_PUSH); assert (s); diff --git a/tests/max_sockets.cpp b/tests/max_sockets.cpp index 5add485..5890d0f 100644 --- a/tests/max_sockets.cpp +++ b/tests/max_sockets.cpp @@ -25,7 +25,7 @@ int XS_TEST_MAIN () fprintf (stderr, "max_sockets test running...\n"); // Create context and set MAX_SOCKETS to 1. - void *ctx = xs_init (1); + void *ctx = xs_init (); assert (ctx); int max_sockets = 1; int rc = xs_setctxopt (ctx, XS_MAX_SOCKETS, &max_sockets, diff --git a/tests/msg_flags.cpp b/tests/msg_flags.cpp index f2853bb..eade40f 100644 --- a/tests/msg_flags.cpp +++ b/tests/msg_flags.cpp @@ -25,7 +25,7 @@ int XS_TEST_MAIN () fprintf (stderr, "msg_flags test running...\n"); // Create the infrastructure - void *ctx = xs_init (1); + void *ctx = xs_init (); assert (ctx); void *sb = xs_socket (ctx, XS_XREP); assert (sb); diff --git a/tests/pair_inproc.cpp b/tests/pair_inproc.cpp index 45b2b7b..c02d08b 100644 --- a/tests/pair_inproc.cpp +++ b/tests/pair_inproc.cpp @@ -24,7 +24,7 @@ int XS_TEST_MAIN () { fprintf (stderr, "pair_inproc test running...\n"); - void *ctx = xs_init (1); + void *ctx = xs_init (); assert (ctx); void *sb = xs_socket (ctx, XS_PAIR); diff --git a/tests/pair_ipc.cpp b/tests/pair_ipc.cpp index 4ce2762..46cdf76 100644 --- a/tests/pair_ipc.cpp +++ b/tests/pair_ipc.cpp @@ -31,7 +31,7 @@ int XS_TEST_MAIN () { fprintf (stderr, "pair_ipc test running...\n"); - void *ctx = xs_init (1); + void *ctx = xs_init (); assert (ctx); void *sb = xs_socket (ctx, XS_PAIR); diff --git a/tests/pair_tcp.cpp b/tests/pair_tcp.cpp index 9bc910a..a0decb9 100644 --- a/tests/pair_tcp.cpp +++ b/tests/pair_tcp.cpp @@ -25,7 +25,7 @@ int XS_TEST_MAIN () { fprintf (stderr, "pair_tcp test running...\n"); - void *ctx = xs_init (1); + void *ctx = xs_init (); assert (ctx); void *sb = xs_socket (ctx, XS_PAIR); diff --git a/tests/polltimeo.cpp b/tests/polltimeo.cpp index b8e63cd..3f7a233 100644 --- a/tests/polltimeo.cpp +++ b/tests/polltimeo.cpp @@ -41,7 +41,7 @@ int XS_TEST_MAIN () { fprintf (stderr, "polltimeo test running...\n"); - void *ctx = xs_init (1); + void *ctx = xs_init (); assert (ctx); // Create a disconnected socket. diff --git a/tests/reconnect.cpp b/tests/reconnect.cpp index 2014fe0..c23d306 100644 --- a/tests/reconnect.cpp +++ b/tests/reconnect.cpp @@ -25,7 +25,7 @@ int XS_TEST_MAIN () fprintf (stderr, "reconnect test running...\n"); // Create the basic infrastructure. - void *ctx = xs_init (1); + void *ctx = xs_init (); assert (ctx); void *push = xs_socket (ctx, XS_PUSH); assert (push); diff --git a/tests/reqrep_device.cpp b/tests/reqrep_device.cpp index 4ce6951..54a9ed4 100644 --- a/tests/reqrep_device.cpp +++ b/tests/reqrep_device.cpp @@ -25,7 +25,7 @@ int XS_TEST_MAIN () { fprintf (stderr, "reqrep_device test running...\n"); - void *ctx = xs_init (1); + void *ctx = xs_init (); assert (ctx); // Create a req/rep device. diff --git a/tests/reqrep_inproc.cpp b/tests/reqrep_inproc.cpp index 7f38bb3..c66b82b 100644 --- a/tests/reqrep_inproc.cpp +++ b/tests/reqrep_inproc.cpp @@ -24,7 +24,7 @@ int XS_TEST_MAIN () { fprintf (stderr, "reqrep_inproc test running...\n"); - void *ctx = xs_init (1); + void *ctx = xs_init (); assert (ctx); void *sb = xs_socket (ctx, XS_REP); diff --git a/tests/reqrep_ipc.cpp b/tests/reqrep_ipc.cpp index ba7b861..7325cbb 100644 --- a/tests/reqrep_ipc.cpp +++ b/tests/reqrep_ipc.cpp @@ -31,7 +31,7 @@ int XS_TEST_MAIN () { fprintf (stderr, "reqrep_ipc test running...\n"); - void *ctx = xs_init (1); + void *ctx = xs_init (); assert (ctx); void *sb = xs_socket (ctx, XS_REP); diff --git a/tests/reqrep_tcp.cpp b/tests/reqrep_tcp.cpp index cb99a66..b11d5a1 100644 --- a/tests/reqrep_tcp.cpp +++ b/tests/reqrep_tcp.cpp @@ -25,7 +25,7 @@ int XS_TEST_MAIN () { fprintf (stderr, "reqrep_tcp test running...\n"); - void *ctx = xs_init (1); + void *ctx = xs_init (); assert (ctx); void *sb = xs_socket (ctx, XS_REP); diff --git a/tests/shutdown_stress.cpp b/tests/shutdown_stress.cpp index c0816cd..d7dffe8 100644 --- a/tests/shutdown_stress.cpp +++ b/tests/shutdown_stress.cpp @@ -46,6 +46,7 @@ int XS_TEST_MAIN () int i; int j; int rc; + int io_threads; void *threads [THREAD_COUNT]; fprintf (stderr, "shutdown_stress test running...\n"); @@ -53,8 +54,12 @@ int XS_TEST_MAIN () for (j = 0; j != 10; j++) { // Check the shutdown with many parallel I/O threads. - ctx = xs_init (7); + ctx = xs_init (); assert (ctx); + io_threads = 7; + rc = xs_setctxopt (ctx, XS_IO_THREADS, &io_threads, + sizeof (io_threads)); + assert (rc == 0); s1 = xs_socket (ctx, XS_PUB); assert (s1); diff --git a/tests/sub_forward.cpp b/tests/sub_forward.cpp index 5dced71..cfff043 100644 --- a/tests/sub_forward.cpp +++ b/tests/sub_forward.cpp @@ -25,7 +25,7 @@ int XS_TEST_MAIN () { fprintf (stderr, "sub_forward test running...\n"); - void *ctx = xs_init (1); + void *ctx = xs_init (); assert (ctx); // First, create an intermediate device. diff --git a/tests/timeo.cpp b/tests/timeo.cpp index 0628b94..000e718 100644 --- a/tests/timeo.cpp +++ b/tests/timeo.cpp @@ -41,7 +41,7 @@ int XS_TEST_MAIN () { fprintf (stderr, "timeo test running...\n"); - void *ctx = xs_init (1); + void *ctx = xs_init (); assert (ctx); // Create a disconnected socket. |