0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-14 01:37:56 +08:00

Problem: test cases are failing on slower PCs (eee PC)

Solution: raise timeouts from 100-150 msec to 250 msec
This commit is contained in:
Pieter Hintjens 2015-01-30 11:57:31 +01:00
parent 9fc0d2f1a3
commit a7a512ab3d
13 changed files with 19 additions and 19 deletions

View File

@ -75,7 +75,7 @@ int main (void)
// We now consume from the connected pipe
// - we should see just 5
int timeout = 100;
int timeout = 250;
rc = zmq_setsockopt (to, ZMQ_RCVTIMEO, &timeout, sizeof (int));
assert (rc == 0);

View File

@ -37,7 +37,7 @@ static void bounce_fail (void *server, void *client)
assert (rc == 32);
// Receive message at server side (should not succeed)
int timeout = 150;
int timeout = 250;
rc = zmq_setsockopt (server, ZMQ_RCVTIMEO, &timeout, sizeof (int));
assert (rc == 0);
rc = zmq_recv (server, buffer, 32, 0);
@ -77,7 +77,7 @@ static void run_test (int opt, T optval, int expected_error, int bounce_test)
assert (sc);
// If a test fails, don't hang for too long
int timeout = 1500;
int timeout = 2500;
rc = zmq_setsockopt (sb, ZMQ_RCVTIMEO, &timeout, sizeof (int));
assert (rc == 0);
rc = zmq_setsockopt (sb, ZMQ_SNDTIMEO, &timeout, sizeof (int));

View File

@ -66,7 +66,7 @@ int main (void)
// We now consume from the connected pipe
// - we should see just 5
int timeout = 100;
int timeout = 250;
rc = zmq_setsockopt (to, ZMQ_RCVTIMEO, &timeout, sizeof (int));
assert (rc == 0);

View File

@ -44,7 +44,7 @@ int main (void)
rep [peer] = zmq_socket (ctx, ZMQ_REP);
assert (rep [peer]);
int timeout = 100;
int timeout = 250;
rc = zmq_setsockopt (rep [peer], ZMQ_RCVTIMEO, &timeout, sizeof (int));
assert (rc == 0);

View File

@ -244,7 +244,7 @@ int main (void)
send (s, "\x01\x00", 2, 0);
// send sneaky message that shouldn't be received
send (s, "\x08\x00sneaky\0", 9, 0);
int timeout = 150;
int timeout = 250;
zmq_setsockopt (server, ZMQ_RCVTIMEO, &timeout, sizeof (timeout));
char *buf = s_recv (server);
if (buf != NULL) {

View File

@ -157,7 +157,7 @@ int main (void)
send (s, "\x01\x00", 2, 0);
// send sneaky message that shouldn't be received
send (s, "\x08\x00sneaky\0", 9, 0);
int timeout = 150;
int timeout = 250;
zmq_setsockopt (server, ZMQ_RCVTIMEO, &timeout, sizeof (timeout));
char *buf = s_recv (server);
if (buf != NULL) {

View File

@ -163,7 +163,7 @@ int main (void)
send (s, "\x01\x00", 2, 0);
// send sneaky message that shouldn't be received
send (s, "\x08\x00sneaky\0", 9, 0);
int timeout = 150;
int timeout = 250;
zmq_setsockopt (server, ZMQ_RCVTIMEO, &timeout, sizeof (timeout));
char *buf = s_recv (server);
if (buf != NULL) {

View File

@ -36,7 +36,7 @@ void test_round_robin_out (void *ctx)
rep [peer] = zmq_socket (ctx, ZMQ_REP);
assert (rep [peer]);
int timeout = 100;
int timeout = 250;
rc = zmq_setsockopt (rep [peer], ZMQ_RCVTIMEO, &timeout, sizeof (int));
assert (rc == 0);
@ -77,7 +77,7 @@ void test_fair_queue_in (void *ctx)
void *receiver = zmq_socket (ctx, ZMQ_DEALER);
assert (receiver);
int timeout = 100;
int timeout = 250;
int rc = zmq_setsockopt (receiver, ZMQ_RCVTIMEO, &timeout, sizeof (int));
assert (rc == 0);
@ -200,7 +200,7 @@ void test_block_on_send_no_peers (void *ctx)
void *sc = zmq_socket (ctx, ZMQ_DEALER);
assert (sc);
int timeout = 100;
int timeout = 250;
int rc = zmq_setsockopt (sc, ZMQ_SNDTIMEO, &timeout, sizeof (timeout));
assert (rc == 0);

View File

@ -36,7 +36,7 @@ void test_push_round_robin_out (void *ctx)
pulls [peer] = zmq_socket (ctx, ZMQ_PULL);
assert (pulls [peer]);
int timeout = 100;
int timeout = 250;
rc = zmq_setsockopt (pulls [peer], ZMQ_RCVTIMEO, &timeout, sizeof (int));
assert (rc == 0);
@ -155,7 +155,7 @@ void test_push_block_on_send_no_peers (void *ctx)
void *sc = zmq_socket (ctx, ZMQ_PUSH);
assert (sc);
int timeout = 100;
int timeout = 250;
int rc = zmq_setsockopt (sc, ZMQ_SNDTIMEO, &timeout, sizeof (timeout));
assert (rc == 0);

View File

@ -27,7 +27,7 @@ void test_fair_queue_in (void *ctx)
void *rep = zmq_socket (ctx, ZMQ_REP);
assert (rep);
int timeout = 100;
int timeout = 250;
int rc = zmq_setsockopt (rep, ZMQ_RCVTIMEO, &timeout, sizeof (int));
assert (rc == 0);

View File

@ -36,7 +36,7 @@ void test_round_robin_out (void *ctx)
rep [peer] = zmq_socket (ctx, ZMQ_REP);
assert (rep [peer]);
int timeout = 100;
int timeout = 250;
rc = zmq_setsockopt (rep [peer], ZMQ_RCVTIMEO, &timeout, sizeof (int));
assert (rc == 0);
@ -83,7 +83,7 @@ void test_req_only_listens_to_current_peer (void *ctx)
router [i] = zmq_socket (ctx, ZMQ_ROUTER);
assert (router [i]);
int timeout = 100;
int timeout = 250;
rc = zmq_setsockopt (router [i], ZMQ_RCVTIMEO, &timeout, sizeof (timeout));
assert (rc == 0);
@ -195,7 +195,7 @@ void test_block_on_send_no_peers (void *ctx)
void *sc = zmq_socket (ctx, ZMQ_REQ);
assert (sc);
int timeout = 100;
int timeout = 250;
int rc = zmq_setsockopt (sc, ZMQ_SNDTIMEO, &timeout, sizeof (timeout));
assert (rc == 0);

View File

@ -27,7 +27,7 @@ void test_fair_queue_in (void *ctx)
void *receiver = zmq_socket (ctx, ZMQ_ROUTER);
assert (receiver);
int timeout = 100;
int timeout = 250;
int rc = zmq_setsockopt (receiver, ZMQ_RCVTIMEO, &timeout, sizeof (int));
assert (rc == 0);

View File

@ -112,7 +112,7 @@ expect_bounce_fail (void *server, void *client)
{
const char *content = "12345678ABCDEFGH12345678abcdefgh";
char buffer [32];
int timeout = 150;
int timeout = 250;
// Send message from client to server
int rc = zmq_setsockopt (client, ZMQ_SNDTIMEO, &timeout, sizeof (int));