From eacd4d9cba87c8e6876839d81056131cca1a0c90 Mon Sep 17 00:00:00 2001 From: Pieter Hintjens Date: Tue, 23 Dec 2014 15:21:22 +0100 Subject: [PATCH] Problem: test cases were sporadically failing Solution: increase settle time for bind/unbind tests --- tests/test_disconnect_inproc.cpp | 6 ++++-- tests/testutil.hpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/test_disconnect_inproc.cpp b/tests/test_disconnect_inproc.cpp index 475ce0b0..dd484fcd 100644 --- a/tests/test_disconnect_inproc.cpp +++ b/tests/test_disconnect_inproc.cpp @@ -25,8 +25,10 @@ zmq_msg_init(&msg) && printf("zmq_msg_init: %s\n", zmq_strerror(errno)); \ zmq_msg_init_size (&msg, size + 1) && printf("zmq_msg_init_size: %s\n",zmq_strerror(errno)); \ memcpy(zmq_msg_data(&msg), data, size + 1); -int publicationsReceived = 0; -bool isSubscribed = false; +// TODO: this code fails to meet our style guidelines, and needs rewriting + +static int publicationsReceived = 0; +static bool isSubscribed = false; int main(int, char**) { setup_test_environment(); diff --git a/tests/testutil.hpp b/tests/testutil.hpp index c59578d1..7d9b74c7 100644 --- a/tests/testutil.hpp +++ b/tests/testutil.hpp @@ -27,7 +27,7 @@ // This defines the settle time used in tests; raise this if we // get test failures on slower systems due to binds/connects not // settled. Tested to work reliably at 1 msec on a fast PC. -#define SETTLE_TIME 10 // In msec +#define SETTLE_TIME 50 // In msec #undef NDEBUG #include