mirror of
https://github.com/apache/activemq.git
synced 2025-02-09 19:45:55 +00:00
Improve stability of KahaDB tests
This commit is contained in:
parent
1be0d3228d
commit
8c384676a8
@ -278,7 +278,7 @@ public abstract class PListTestSupport {
|
|||||||
executor.execute(new B());
|
executor.execute(new B());
|
||||||
|
|
||||||
executor.shutdown();
|
executor.shutdown();
|
||||||
boolean finishedInTime = executor.awaitTermination(5, TimeUnit.MINUTES);
|
boolean finishedInTime = executor.awaitTermination(10, TimeUnit.MINUTES);
|
||||||
LOG.info("Tested completion finished in time? -> {}", finishedInTime ? "YES" : "NO");
|
LOG.info("Tested completion finished in time? -> {}", finishedInTime ? "YES" : "NO");
|
||||||
|
|
||||||
assertTrue("no exceptions", exceptions.isEmpty());
|
assertTrue("no exceptions", exceptions.isEmpty());
|
||||||
|
@ -42,7 +42,7 @@ public class AMQ7086Test {
|
|||||||
JobSchedulerStoreImpl jobSchedulerStore;
|
JobSchedulerStoreImpl jobSchedulerStore;
|
||||||
KahaDBPersistenceAdapter kahaDBPersistenceAdapter;
|
KahaDBPersistenceAdapter kahaDBPersistenceAdapter;
|
||||||
|
|
||||||
@Test
|
@Test(timeout = 120000)
|
||||||
public void testGcDoneAtStop() throws Exception {
|
public void testGcDoneAtStop() throws Exception {
|
||||||
|
|
||||||
brokerService = createBroker(true);
|
brokerService = createBroker(true);
|
||||||
@ -63,8 +63,14 @@ public class AMQ7086Test {
|
|||||||
|
|
||||||
brokerService.stop();
|
brokerService.stop();
|
||||||
|
|
||||||
|
while (verifyFilesOnDisk(jobDir) < 1) {
|
||||||
|
Thread.sleep(100);
|
||||||
|
}
|
||||||
assertTrue("Expected job store data files at least 1", verifyFilesOnDisk(jobDir) >= 1);
|
assertTrue("Expected job store data files at least 1", verifyFilesOnDisk(jobDir) >= 1);
|
||||||
assertEquals("Expected kahadb data files", 1, verifyFilesOnDisk(kahaDir));
|
while (verifyFilesOnDisk(kahaDir) < 1) {
|
||||||
|
Thread.sleep(100);
|
||||||
|
}
|
||||||
|
assertTrue("Expected kahadb data files at least 1", verifyFilesOnDisk(kahaDir) >= 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user