util: work around timeouts in tests
@@ -110,12 +110,18 @@ public class GuicyKillbillTestSuiteWithEmbeddedDB extends GuicyKillbillTestSuite
}
protected void cleanupAllTables() {
+ // Work around tests flakiness (see also RetryableDataSource)
+ for (int i = 0; i < 5; i++) {
try {
DBTestingHelper.get().getInstance().cleanupAllTables();
+ break;
} catch (final Exception e) {
+ if (i == 4) {
Assert.fail("Unable to clean database", e);
}
}
+ }
+ }
@AfterSuite(groups = "slow")
public void afterSuite() throws Exception {
