Skip to content

Commit

Permalink
Added some logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ihsandemir committed Mar 29, 2016
1 parent c809275 commit 4be6d44
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hazelcast/test/src/countdownlatch/ICountDownLatchTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ namespace hazelcast {

void testLatchThread(util::ThreadArgs &args) {
ICountDownLatch *l = (ICountDownLatch *) args.arg0;
util::ILogger &logger = util::ILogger::getLogger();
for (int i = 0; i < 20; i++) {
char msg[200];
util::snprintf(msg, 200, "[testLatchThread] Before decrementing the latch. i:%d", i);
logger.info(msg);
l->countDown();
util::snprintf(msg, 200, "[testLatchThread] After decrementing the latch. i:%d", i);
logger.info(msg);
}
}

Expand All @@ -47,7 +53,10 @@ namespace hazelcast {

util::Thread t(testLatchThread, l.get());

util::ILogger &logger = util::ILogger::getLogger();
logger.info("[testLatch] Starting to wait the latch for 10 seconds");
ASSERT_TRUE(l->await(10 * 1000));
logger.info("[testLatch] After latch await call");
}

}
Expand Down

0 comments on commit 4be6d44

Please sign in to comment.