From fa11db905a01f95fc01833d94987fe5790796745 Mon Sep 17 00:00:00 2001 From: Shigeki Ohtsu Date: Mon, 26 Nov 2012 11:35:29 +0900 Subject: [PATCH] test: fix finished consumer number check --- test/test-condvar-consumer-producer.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/test-condvar-consumer-producer.c b/test/test-condvar-consumer-producer.c index b2e8d3d9..a7bd5a65 100644 --- a/test/test-condvar-consumer-producer.c +++ b/test/test-condvar-consumer-producer.c @@ -82,9 +82,6 @@ static void producer(void* arg) { uv_cond_signal(&full); uv_mutex_unlock(&mutex); } - - LOGF("finished_consumers: %d\n", finished_consumers); - ASSERT(finished_consumers == MAX_CONSUMERS); } @@ -129,6 +126,10 @@ TEST_IMPL(consumer_producer) { } ASSERT(0 == uv_thread_join(&pthread)); + + LOGF("finished_consumers: %d\n", finished_consumers); + ASSERT(finished_consumers == MAX_CONSUMERS); + uv_cond_destroy(&empty); uv_cond_destroy(&full); uv_mutex_destroy(&mutex);