diff --git a/cat-client/src/test/java/com/dianping/cat/message/context/MessageIdFactoryTest.java b/cat-client/src/test/java/com/dianping/cat/message/context/MessageIdFactoryTest.java index 4c5f2e2cbb..770b4dd16d 100644 --- a/cat-client/src/test/java/com/dianping/cat/message/context/MessageIdFactoryTest.java +++ b/cat-client/src/test/java/com/dianping/cat/message/context/MessageIdFactoryTest.java @@ -101,18 +101,18 @@ public void run() { } pool.shutdown(); - boolean finished = pool.awaitTermination(1, TimeUnit.HOURS); + boolean finished = pool.awaitTermination(60, TimeUnit.SECONDS); if (finished) { int total = threads * messagesPerThread; Assert.assertEquals("Not all threads completed in time.", total, ids.size()); - Assert.assertEquals(true, ids.contains(String.format("default-parallel-c0a81f9e-403215-%s", total - 1))); + Assert.assertTrue(ids.contains(String.format("default-parallel-c0a81f9e-403215-%s", total - 1))); Assert.assertEquals(String.format("default-parallel-c0a81f9e-403215-%s", total), factory.getNextId()); } else { - Assert.fail("Threads did not finish in 1 hour"); + Assert.fail("Threads did not finish in 60 seconds"); } - } + } @Test public void testGivenDomainInParallel() throws Exception {