Improve AMQ7118Test stability

This commit is contained in:
jbonofre 2020-11-14 07:18:03 +01:00
parent 12e7a1952b
commit 75c3fd4c34
1 changed files with 7 additions and 1 deletions

View File

@ -185,12 +185,18 @@ public class AMQ7118Test {
if(doCheckpoint) {
LOG.info("Initiating checkpointUpdate "+ ++checkpointIndex + " ...");
broker.getPersistenceAdapter().checkpoint(true);
TimeUnit.SECONDS.sleep(2);
TimeUnit.SECONDS.sleep(4);
LOG.info("Checkpoint complete.");
}
File files[] = dbfiles.listFiles(lff);
Arrays.sort(files, new DBFileComparator() );
logfiles(files);
while (files.length != expectedCount) {
// gives time to checkpoint
TimeUnit.SECONDS.sleep(1);
}
assertEquals(expectedCount, files.length);
assertEquals(lastFileName, files[files.length-1].getName());