Skip to content

Commit

Permalink
H2 tests may end up with an incorrect list of the standard DatabaseOb…
Browse files Browse the repository at this point in the history
…ject types, so we need to reset the factory (#5899)

* H2 tests may end up with an incorrect list of the standard
DatabaseObject types, so we need to reset the factory

* Another comment
  • Loading branch information
wwillard7800 committed May 13, 2024
1 parent 372154d commit ca5e3c5
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import liquibase.executor.Executor;
import liquibase.executor.ExecutorService;
import liquibase.statement.core.RawSqlStatement;
import liquibase.structure.core.DatabaseObjectFactory;
import org.junit.Assert;
import org.junit.Test;

Expand All @@ -41,6 +42,12 @@ public H2IntegrationTest() throws Exception {
super("h2", DatabaseFactory.getInstance().getDatabase("h2"));
this.changeSpecifyDbmsChangeLog = "changelogs/h2/complete/change.specify.dbms.changelog.xml";
this.dbmsExcludeChangelog = "changelogs/h2/complete/dbms.exclude.changelog.xml";
//
// Reset the factory so that the standard types will be repopulated
// They might have been changed by a previous test. Without the correct
// list of types, not all objects will be correctly dropped.
//
DatabaseObjectFactory.getInstance().reset();
}

@Test
Expand Down

0 comments on commit ca5e3c5

Please sign in to comment.