Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
test: fix watcher_cross_stop
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
saghul committed Jul 8, 2014
1 parent 4189122 commit ad78e45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test-watcher-cross-stop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ad78e45

Please sign in to comment.