Skip to content

Commit

Permalink
reduce timeout of test to 60 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
simonh5 committed Oct 13, 2023
1 parent 6de7273 commit ada9cb2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ada9cb2

Please sign in to comment.