Permalink
Browse files

test: fix finished consumer number check

  • Loading branch information...
1 parent 2be240d commit fa11db905a01f95fc01833d94987fe5790796745 @shigeki shigeki committed with bnoordhuis Nov 26, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 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);

0 comments on commit fa11db9

Please sign in to comment.