Skip to content

Commit

Permalink
change to testPurge.
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Sep 12, 2009
1 parent d5191ca commit 4f25c82
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -384,7 +384,10 @@ public void syncUpdateWithEmptyKey() {
public void testPurge() throws Exception {
logTestRunning();
IParameterService parameterService = AppUtils.find(Constants.PARAMETER_SERVICE, getClientEngine());
parameterService.saveParameter(ParameterConstants.PURGE_RETENTION_MINUTES, 0);
int purgeRetentionMinues = parameterService.getInt(ParameterConstants.PURGE_RETENTION_MINUTES);
// set purge in the future just in case the database time is different than the current time
parameterService.saveParameter(ParameterConstants.PURGE_RETENTION_MINUTES, -1000);

// do an extra push & pull to make sure we have events cleared out
getClientEngine().pull();
getClientEngine().push();
Expand All @@ -401,6 +404,7 @@ public void testPurge() throws Exception {
afterPurge = clientJdbcTemplate.queryForInt("select count(*) from sym_data");
Assert.assertTrue("Expected data rows to have been purged at the client. There were " + beforePurge
+ " row before anf " + afterPurge + " rows after.", (beforePurge - afterPurge) > 0);
parameterService.saveParameter(ParameterConstants.PURGE_RETENTION_MINUTES, purgeRetentionMinues);
}

@Test
Expand Down

0 comments on commit 4f25c82

Please sign in to comment.