Skip to content

Commit

Permalink
Fixed broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Catherine Quamme authored and Catherine Quamme committed Feb 5, 2024
1 parent 44110ac commit 56647ab
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,9 @@ public void test25TestPurge() throws Exception {
public void test25TestPurge2() throws Exception {
logTestRunning();
Assertions.assertTimeoutPreemptively(Duration.ofMinutes(5), () -> {
// do an extra push & pull to make sure we have events cleared out
clientPull();
clientPush();
int totalCount = getServer().getSqlTemplate().queryForInt("select count(*) from sym_data_event");
int batchId = getServer().getSqlTemplate().queryForInt("select min(batch_id) from sym_outgoing_batch");
int purgeCount = getServer().getSqlTemplate().queryForInt("select count(*) from sym_data_event where batch_id = ?", batchId);
Expand All @@ -858,7 +861,7 @@ public void test25TestPurge2() throws Exception {
getServer().purge();
parameterService.saveParameter(ParameterConstants.PURGE_RETENTION_MINUTES, purgeRetentionMinues, "test");
int count = getServer().getSqlTemplate().queryForInt("select count(*) from sym_data_event where batch_id = ?", batchId);
assertEquals(count, 0);
assertEquals(0, count);
int newTotalCount = getServer().getSqlTemplate().queryForInt("select count(*) from sym_data_event");
assertEquals(newTotalCount, totalCount - purgeCount);
});
Expand Down

0 comments on commit 56647ab

Please sign in to comment.