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

Commit

Permalink
Browse files Browse the repository at this point in the history
test: make threadpool tests valgrind-compliant
Delete the event loop after the test to stop valgrind from complaining
about memory leaks.
  • Loading branch information
bnoordhuis committed Jan 16, 2013
1 parent 4ba03dd commit e7f384f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/test-threadpool-cancel.c
Expand Up @@ -195,6 +195,7 @@ TEST_IMPL(threadpool_cancel_getaddrinfo) {


cleanup_threadpool(); cleanup_threadpool();


MAKE_VALGRIND_HAPPY();
return 0; return 0;
} }


Expand All @@ -220,6 +221,7 @@ TEST_IMPL(threadpool_cancel_work) {


cleanup_threadpool(); cleanup_threadpool();


MAKE_VALGRIND_HAPPY();
return 0; return 0;
} }


Expand Down Expand Up @@ -271,6 +273,7 @@ TEST_IMPL(threadpool_cancel_fs) {


cleanup_threadpool(); cleanup_threadpool();


MAKE_VALGRIND_HAPPY();
return 0; return 0;
} }


Expand Down Expand Up @@ -303,5 +306,6 @@ TEST_IMPL(threadpool_cancel_single) {
ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
ASSERT(req.data != NULL); /* Should have been updated by nop_done_cb(). */ ASSERT(req.data != NULL); /* Should have been updated by nop_done_cb(). */


MAKE_VALGRIND_HAPPY();
return 0; return 0;
} }

0 comments on commit e7f384f

Please sign in to comment.