Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement flyway migration for config database normalization + tests #8563

Merged
merged 11 commits into from
Dec 21, 2021
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void testBootloaderAppBlankDb() throws Exception {
mockedConfigs.getConfigDatabaseUrl())
.getAndInitialize();
val configsMigrator = new ConfigsDatabaseMigrator(configDatabase, this.getClass().getName());
assertEquals("0.30.22.001", configsMigrator.getLatestMigration().getVersion().getVersion());
assertEquals("0.32.8.001", configsMigrator.getLatestMigration().getVersion().getVersion());

val jobsPersistence = new DefaultJobPersistence(jobDatabase);
assertEquals(version, jobsPersistence.getVersion().get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ public static <T> T deserialize(final String jsonString, final Class<T> klass) {
}
}

public static <T> T convertValue(final Object object, final Class<T> klass) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a javadoc comment explaining what context this should be used in.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

return OBJECT_MAPPER.convertValue(object, klass);
}

public static JsonNode deserialize(final String jsonString) {
try {
return OBJECT_MAPPER.readTree(jsonString);
Expand Down

Large diffs are not rendered by default.

Loading