diff --git a/test/uvw/handle.cpp b/test/uvw/handle.cpp index bd50b70a..242680f6 100644 --- a/test/uvw/handle.cpp +++ b/test/uvw/handle.cpp @@ -11,6 +11,10 @@ TEST(Handle, Functionalities) { ASSERT_NO_THROW(handle->close()); ASSERT_FALSE(handle->active()); + // this forces an internal call to the close callback + // (possible leak detected by valgrind otherwise) + loop->run(); + ASSERT_NO_THROW(handle->reference()); ASSERT_TRUE(handle->referenced()); ASSERT_NO_THROW(handle->unreference()); diff --git a/test/uvw/timer.cpp b/test/uvw/timer.cpp index baaeb926..41fc5511 100644 --- a/test/uvw/timer.cpp +++ b/test/uvw/timer.cpp @@ -108,6 +108,11 @@ TEST(Timer, Repeat) { ASSERT_NO_THROW(handle->repeat(uvw::TimerHandle::Time{42})); ASSERT_EQ(handle->repeat(), uvw::TimerHandle::Time{42}); + ASSERT_NO_THROW(handle->close()); + + // this forces an internal call to the close callback + // (possible leak detected by valgrind otherwise) + loop->run(); }