diff --git a/src/main/java/com/tacitknowledge/util/migration/jdbc/JdbcMigrationLauncher.java b/src/main/java/com/tacitknowledge/util/migration/jdbc/JdbcMigrationLauncher.java index ed52e41..3b59fe2 100644 --- a/src/main/java/com/tacitknowledge/util/migration/jdbc/JdbcMigrationLauncher.java +++ b/src/main/java/com/tacitknowledge/util/migration/jdbc/JdbcMigrationLauncher.java @@ -369,11 +369,11 @@ public void setPostPatchPath(String searchPath) String path = st.nextToken(); if (path.indexOf('/') > -1) { - migrationProcess.addPostPatchResourceDirectory(path); + getMigrationProcess().addPostPatchResourceDirectory(path); } else { - migrationProcess.addPostPatchResourcePackage(path); + getMigrationProcess().addPostPatchResourcePackage(path); } } } diff --git a/src/test/java/com/tacitknowledge/util/migration/jdbc/JdbcMigrationLauncherTest.java b/src/test/java/com/tacitknowledge/util/migration/jdbc/JdbcMigrationLauncherTest.java index 1ee0673..fa5ecc3 100644 --- a/src/test/java/com/tacitknowledge/util/migration/jdbc/JdbcMigrationLauncherTest.java +++ b/src/test/java/com/tacitknowledge/util/migration/jdbc/JdbcMigrationLauncherTest.java @@ -192,6 +192,18 @@ public void testMultiNodeConfiguration() throws Exception { assertEquals("postgres", context2.getDatabaseType().getDatabaseType()); } + /** + * Verify that the postpatch path can be set + * + * @throws Exception if there is a problem + */ + public void testSetPostpatchPath() throws Exception { + String postpatchPath = "com.tacitknowledge.util.migration.tasks.post"; + TestJdbcMigrationLauncher testLauncher = new TestJdbcMigrationLauncher(context); + testLauncher.setPostPatchPath(postpatchPath); + assertEquals(postpatchPath, testLauncher.getPostPatchPath()); + } + /** * Test doing migrations with a lock race from a quick cluster *