Skip to content

Commit

Permalink
Some test timing tweaks to try to work around CI failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
gbevin committed Sep 30, 2023
1 parent 0994f18 commit 5fb6fa1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
15 changes: 9 additions & 6 deletions src/test/java/rife/bld/operations/TestCreateRife2Operation.java
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,10 @@ void testExecute()
} catch (FileUtilsErrorException e) {
throw new RuntimeException(e);
}
}, 1, TimeUnit.SECONDS);
executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS);
}, 2, TimeUnit.SECONDS);
executor.schedule(() -> run_operation.process().destroy(), 4, TimeUnit.SECONDS);
assertThrows(ExitStatusException.class, run_operation::execute);
Thread.sleep(1000);

assertTrue(check_result.toString().contains("<p>Hello World Myapp</p>"));
} finally {
Expand Down Expand Up @@ -542,9 +543,10 @@ void testExecuteLocalDependencies()
} catch (FileUtilsErrorException e) {
throw new RuntimeException(e);
}
}, 1, TimeUnit.SECONDS);
executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS);
}, 2, TimeUnit.SECONDS);
executor.schedule(() -> run_operation.process().destroy(), 4, TimeUnit.SECONDS);
assertThrows(ExitStatusException.class, run_operation::execute);
Thread.sleep(1000);

assertTrue(check_result.toString().contains("<p>Hello World Myapp</p>"), check_result.toString());
} finally {
Expand Down Expand Up @@ -708,9 +710,10 @@ void testExecuteLocalDependenciesFolders()
} catch (FileUtilsErrorException e) {
throw new RuntimeException(e);
}
}, 1, TimeUnit.SECONDS);
executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS);
}, 2, TimeUnit.SECONDS);
executor.schedule(() -> run_operation.process().destroy(), 4, TimeUnit.SECONDS);
assertThrows(ExitStatusException.class, run_operation::execute);
Thread.sleep(1000);

assertTrue(check_result.toString().contains("<p>Hello World Myapp</p>"));
} finally {
Expand Down
5 changes: 3 additions & 2 deletions src/test/java/rife/bld/operations/TestUberJarOperation.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,10 @@ void testFromProjectWeb()
} catch (FileUtilsErrorException e) {
throw new RuntimeException(e);
}
}, 1, TimeUnit.SECONDS);
executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS);
}, 2, TimeUnit.SECONDS);
executor.schedule(() -> run_operation.process().destroy(), 4, TimeUnit.SECONDS);
assertThrows(ExitStatusException.class, run_operation::execute);
Thread.sleep(1000);

assertTrue(check_result.toString().contains("<p>Hello World App</p>"));
} finally {
Expand Down

0 comments on commit 5fb6fa1

Please sign in to comment.