mirror of
https://github.com/zeromq/libzmq.git
synced 2025-02-24 23:34:50 +01:00
Problem: test_proxy_hwm expects wrong number of msgs
Solution: allow for a range between the minimum and maximum expected. With 2 queues, that's between 20 and 40 messages depending on the scheduling of the 3 threads involved.
This commit is contained in:
parent
e651babd85
commit
df218af3bd
@ -126,9 +126,7 @@ static void publisher_thread_main (void *pvoid)
|
|||||||
// So depending on the scheduling of the second thread, the publisher might get one,
|
// So depending on the scheduling of the second thread, the publisher might get one,
|
||||||
// two or three more batches in. The ceiling is 40 as there's 2 queues.
|
// two or three more batches in. The ceiling is 40 as there's 2 queues.
|
||||||
//
|
//
|
||||||
assert (4 * HWM == send_count || 3 * HWM == send_count
|
assert (4 * HWM >= send_count && 2 * HWM <= send_count);
|
||||||
|| 2 * HWM == send_count);
|
|
||||||
|
|
||||||
|
|
||||||
// CLEANUP
|
// CLEANUP
|
||||||
|
|
||||||
@ -178,9 +176,7 @@ static void subscriber_thread_main (void *pvoid)
|
|||||||
// EXPLANATION FOR RX TO BE CONSIDERED SUCCESSFUL:
|
// EXPLANATION FOR RX TO BE CONSIDERED SUCCESSFUL:
|
||||||
// see publisher thread why we have 3 possible outcomes as number of RX messages
|
// see publisher thread why we have 3 possible outcomes as number of RX messages
|
||||||
|
|
||||||
assert (4 * HWM == rxsuccess || 3 * HWM == rxsuccess
|
assert (4 * HWM >= rxsuccess && 2 * HWM <= rxsuccess);
|
||||||
|| 2 * HWM == rxsuccess);
|
|
||||||
|
|
||||||
|
|
||||||
// INFORM THAT WE COMPLETED:
|
// INFORM THAT WE COMPLETED:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user