From 577d64c0070eb4889d7dc24d024825f1a7e513c6 Mon Sep 17 00:00:00 2001 From: Simon Giesecke Date: Mon, 3 Feb 2020 23:36:08 +0100 Subject: [PATCH] Problem: intermittent timeouts on test_heartbeats Solution: increase number of retries when reading monitor event, and increase timeout --- tests/test_heartbeats.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_heartbeats.cpp b/tests/test_heartbeats.cpp index f422ff19..943b6792 100644 --- a/tests/test_heartbeats.cpp +++ b/tests/test_heartbeats.cpp @@ -50,7 +50,7 @@ SETUP_TEARDOWN_TESTCONTEXT static int get_monitor_event (void *monitor_) { - for (int i = 0; i < 2; i++) { + for (int i = 0; i < 10; i++) { // First frame in message contains event number and value zmq_msg_t msg; TEST_ASSERT_SUCCESS_ERRNO (zmq_msg_init (&msg)); @@ -417,7 +417,9 @@ void test_setsockopt_heartbeat_ttl_near_zero () int main (void) { - setup_test_environment (); + // The test cases are very long-running. The default timeout of 60 seconds + // is not always enough. + setup_test_environment (90); UNITY_BEGIN ();