mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-19 18:03:50 +00:00
Problem: various tests fail in slow environments
Solution: add msleep (SETTLE_TIME) to test_immediate, test_spec_rep and test_spec_router after the sockets are created and connected to avoid failing when running in slower environment like through Valgrind in underpowered VMs.
This commit is contained in:
parent
4a84f8a02e
commit
cb41201880
@ -67,6 +67,8 @@ int main (void)
|
|||||||
rc = zmq_connect (from, "tcp://localhost:6555");
|
rc = zmq_connect (from, "tcp://localhost:6555");
|
||||||
assert (rc == 0);
|
assert (rc == 0);
|
||||||
|
|
||||||
|
msleep (SETTLE_TIME);
|
||||||
|
|
||||||
// We send 10 messages, 5 should just get stuck in the queue
|
// We send 10 messages, 5 should just get stuck in the queue
|
||||||
// for the not-yet-connected pipe
|
// for the not-yet-connected pipe
|
||||||
for (int i = 0; i < 10; ++i) {
|
for (int i = 0; i < 10; ++i) {
|
||||||
|
@ -57,6 +57,8 @@ void test_fair_queue_in (void *ctx)
|
|||||||
assert (rc == 0);
|
assert (rc == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
msleep (SETTLE_TIME);
|
||||||
|
|
||||||
s_send_seq (reqs [0], "A", SEQ_END);
|
s_send_seq (reqs [0], "A", SEQ_END);
|
||||||
s_recv_seq (rep, "A", SEQ_END);
|
s_recv_seq (rep, "A", SEQ_END);
|
||||||
s_send_seq (rep, "A", SEQ_END);
|
s_send_seq (rep, "A", SEQ_END);
|
||||||
|
@ -63,6 +63,8 @@ void test_fair_queue_in (void *ctx)
|
|||||||
assert (rc == 0);
|
assert (rc == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
msleep (SETTLE_TIME);
|
||||||
|
|
||||||
zmq_msg_t msg;
|
zmq_msg_t msg;
|
||||||
rc = zmq_msg_init (&msg);
|
rc = zmq_msg_init (&msg);
|
||||||
assert (rc == 0);
|
assert (rc == 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user