From ad78e456e9f4670f234f51c768598c04b76fce37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Sat, 5 Jul 2014 18:57:11 +0200 Subject: [PATCH] test: fix watcher_cross_stop It's possible that recv_cb_called is bigger than the number of sockets, because if all sends succeed the recv callback is called twice: once with the actual data, and another time with 0. --- test/test-watcher-cross-stop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-watcher-cross-stop.c b/test/test-watcher-cross-stop.c index 9284a1291f..bf765cb00c 100644 --- a/test/test-watcher-cross-stop.c +++ b/test/test-watcher-cross-stop.c @@ -91,7 +91,7 @@ TEST_IMPL(watcher_cross_stop) { for (i = 0; i < ARRAY_SIZE(sockets); i++) uv_close((uv_handle_t*) &sockets[i], close_cb); - ASSERT(0 < recv_cb_called && recv_cb_called <= ARRAY_SIZE(sockets)); + ASSERT(recv_cb_called > 0); ASSERT(ARRAY_SIZE(sockets) == send_cb_called); uv_run(loop, UV_RUN_DEFAULT);