Skip to content

Commit

Permalink
Set flag to turn off compatibility check for liquibase-checks in drop…
Browse files Browse the repository at this point in the history
…All (#6575)

DAT-19160
  • Loading branch information
wwillard7800 authored Dec 11, 2024
1 parent 903cc39 commit 10b8337
Showing 1 changed file with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,20 @@ public void interceptCleanupMethod(IMethodInvocation invocation) throws Throwabl
}

private static void runDropAll(DatabaseTestSystem db) throws Exception {
LockService lockService = LockServiceFactory.getInstance().getLockService(db.getDatabaseFromFactory());
lockService.releaseLock();
CommandScope commandScope = new CommandScope(DropAllCommandStep.COMMAND_NAME);
commandScope.addArgumentValue(DbUrlConnectionArgumentsCommandStep.URL_ARG, db.getConnectionUrl());
commandScope.addArgumentValue(DbUrlConnectionArgumentsCommandStep.USERNAME_ARG, db.getUsername());
commandScope.addArgumentValue(DbUrlConnectionArgumentsCommandStep.PASSWORD_ARG, db.getPassword());
// this is a pro only argument, but is added here because there is no mechanism for adding the argument from the pro tests
commandScope.addArgumentValue("dropDbclhistory", true);
commandScope.setOutput(new ByteArrayOutputStream());
commandScope.execute();
Map<String, Object> scopeValues = new HashMap<>();
scopeValues.put("liquibase.compatibility.check.enableCompatibilityCheck", false);
Scope.child(scopeValues, () -> {
LockService lockService = LockServiceFactory.getInstance().getLockService(db.getDatabaseFromFactory());
lockService.releaseLock();
CommandScope commandScope = new CommandScope(DropAllCommandStep.COMMAND_NAME);
commandScope.addArgumentValue(DbUrlConnectionArgumentsCommandStep.URL_ARG, db.getConnectionUrl());
commandScope.addArgumentValue(DbUrlConnectionArgumentsCommandStep.USERNAME_ARG, db.getUsername());
commandScope.addArgumentValue(DbUrlConnectionArgumentsCommandStep.PASSWORD_ARG, db.getPassword());
// this is a pro only argument, but is added here because there is no mechanism for adding the argument from the pro tests
commandScope.addArgumentValue("dropDbclhistory", true);
commandScope.setOutput(new ByteArrayOutputStream());
commandScope.execute();
});

}
}

0 comments on commit 10b8337

Please sign in to comment.