mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-27 15:41:05 +08:00
Merge pull request #3808 from sigiesec/fix-test-monitor-to-be-checked
Fix intermittent test_monitor and test_security_zap timeouts/deadlocks for now
This commit is contained in:
commit
84ec65482f
@ -116,6 +116,12 @@ void test_monitor_basic ()
|
||||
if (event != ZMQ_EVENT_DISCONNECTED) {
|
||||
TEST_ASSERT_EQUAL_INT (ZMQ_EVENT_MONITOR_STOPPED, event);
|
||||
}
|
||||
// TODO: When not waiting until the monitor stopped, the I/O thread runs
|
||||
// into some deadlock. This must be fixed, but until it is fixed, we wait
|
||||
// here in order to have more reliable test execution.
|
||||
while (event != ZMQ_EVENT_MONITOR_STOPPED) {
|
||||
event = get_monitor_event (server_mon, NULL, NULL);
|
||||
}
|
||||
|
||||
// Close down the sockets
|
||||
// TODO why does this use zero_linger?
|
||||
@ -255,6 +261,12 @@ void test_monitor_versioned_basic (bind_function_t bind_function_,
|
||||
if (event != ZMQ_EVENT_DISCONNECTED) {
|
||||
TEST_ASSERT_EQUAL_INT (ZMQ_EVENT_MONITOR_STOPPED, event);
|
||||
}
|
||||
// TODO: When not waiting until the monitor stopped, the I/O thread runs
|
||||
// into some deadlock. This must be fixed, but until it is fixed, we wait
|
||||
// here in order to have more reliable test execution.
|
||||
while (event != ZMQ_EVENT_MONITOR_STOPPED) {
|
||||
event = get_monitor_event_v2 (server_mon, NULL, NULL, NULL);
|
||||
}
|
||||
free (client_local_address);
|
||||
free (client_remote_address);
|
||||
|
||||
|
@ -346,6 +346,7 @@ void shutdown_context_and_server_side (void *zap_thread_,
|
||||
zmq_unbind (zap_control_, "inproc://handler-control"));
|
||||
}
|
||||
test_context_socket_close (zap_control_);
|
||||
zmq_socket_monitor (server_, NULL, 0);
|
||||
test_context_socket_close (server_mon_);
|
||||
test_context_socket_close (server_);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user