Skip to content

Commit f120810

Browse files
committed
Fixing mlUpdateIndexesTest so it runs after saving the indexes
1 parent 99c235e commit f120810

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

ml-data-hub-plugin/src/test/groovy/com/marklogic/gradle/task/UpdateIndexesTaskTest.groovy

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,17 @@ class UpdateIndexesTaskTest extends BaseTest {
5151

5252
// Loading modules to databases
5353
runTask('mlLoadModules')
54+
runTask('hubSaveIndexes')
5455

55-
// Copying Staging and Final database Index info files to src/main/entity-config dir
56+
// Copying Job database Index info files to src/main/entity-config dir
5657
Path dir = hubConfig().getEntityDatabaseDir()
5758
if (!dir.toFile().exists()) {
5859
dir.toFile().mkdirs()
5960
}
6061

61-
File dstFile = Paths.get(dir.toString(), HubConfig.STAGING_ENTITY_DATABASE_FILE).toFile()
62-
String entityConfigStream = new File("src/test/resources/update-indexes/staging-database.json").getAbsolutePath()
63-
Files.copy(new File(entityConfigStream).toPath(), dstFile.toPath(), StandardCopyOption.REPLACE_EXISTING)
64-
65-
dstFile = Paths.get(dir.toString(), HubConfig.FINAL_ENTITY_DATABASE_FILE).toFile();
66-
entityConfigStream = new File("src/test/resources/update-indexes/final-database.json").getAbsolutePath()
67-
Files.copy(new File(entityConfigStream).toPath(), dstFile.toPath(), StandardCopyOption.REPLACE_EXISTING)
68-
6962
dir = hubConfig().getHubConfigDir()
70-
dstFile = Paths.get(dir.toString(), "databases", "job-database.json").toFile()
71-
entityConfigStream = new File("src/test/resources/update-indexes/job-database.json").getAbsolutePath();
63+
File dstFile = Paths.get(dir.toString(), "databases", "job-database.json").toFile()
64+
String entityConfigStream = new File("src/test/resources/update-indexes/job-database.json").getAbsolutePath();
7265
Files.copy(new File(entityConfigStream).toPath(), dstFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
7366
}
7467

0 commit comments

Comments
 (0)