diff --git a/build.gradle b/build.gradle index ae54de07cb81c..3958f502b3b32 100644 --- a/build.gradle +++ b/build.gradle @@ -9,8 +9,7 @@ buildscript { ext.neo4jVersion = '4.4.9' ext.testContainersVersion = '1.17.4' ext.elasticsearchVersion = '7.10.2' - // TODO: Change to final release version once it's out ETA Mid-April - ext.jacksonVersion = '2.15.0-rc2' + ext.jacksonVersion = '2.15.2' ext.jettyVersion = '9.4.46.v20220331' ext.playVersion = '2.8.18' ext.log4jVersion = '2.19.0' diff --git a/metadata-io/src/test/java/com/linkedin/metadata/ESSampleDataFixture.java b/metadata-io/src/test/java/com/linkedin/metadata/ESSampleDataFixture.java index 20501225ef787..ef9992db1fb25 100644 --- a/metadata-io/src/test/java/com/linkedin/metadata/ESSampleDataFixture.java +++ b/metadata-io/src/test/java/com/linkedin/metadata/ESSampleDataFixture.java @@ -46,6 +46,7 @@ import java.util.Map; import static com.linkedin.metadata.Constants.*; +import static com.linkedin.metadata.ESTestConfiguration.REFRESH_INTERVAL_SECONDS; import static org.mockito.ArgumentMatchers.anySet; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -225,6 +226,7 @@ public SearchService searchServiceHelper( .bulkProcessor(_bulkProcessor) .fixtureName(fixtureName) .targetIndexPrefix(prefix) + .refreshIntervalSeconds(REFRESH_INTERVAL_SECONDS) .build() .read(); diff --git a/metadata-io/src/test/java/com/linkedin/metadata/ESSearchLineageFixture.java b/metadata-io/src/test/java/com/linkedin/metadata/ESSearchLineageFixture.java index ee3be08d82a1f..ade7435bf6652 100644 --- a/metadata-io/src/test/java/com/linkedin/metadata/ESSearchLineageFixture.java +++ b/metadata-io/src/test/java/com/linkedin/metadata/ESSearchLineageFixture.java @@ -48,6 +48,7 @@ import java.util.Map; import static com.linkedin.metadata.Constants.*; +import static com.linkedin.metadata.ESTestConfiguration.REFRESH_INTERVAL_SECONDS; @TestConfiguration @@ -154,6 +155,7 @@ protected LineageSearchService lineageSearchService( .bulkProcessor(_bulkProcessor) .fixtureName(fixtureName) .targetIndexPrefix(prefix) + .refreshIntervalSeconds(REFRESH_INTERVAL_SECONDS) .build() .read(); diff --git a/metadata-io/src/test/java/com/linkedin/metadata/ESTestConfiguration.java b/metadata-io/src/test/java/com/linkedin/metadata/ESTestConfiguration.java index 673474c96cc51..327447341badf 100644 --- a/metadata-io/src/test/java/com/linkedin/metadata/ESTestConfiguration.java +++ b/metadata-io/src/test/java/com/linkedin/metadata/ESTestConfiguration.java @@ -36,7 +36,7 @@ @TestConfiguration public class ESTestConfiguration { private static final int HTTP_PORT = 9200; - private static final int REFRESH_INTERVAL_SECONDS = 5; + public static final int REFRESH_INTERVAL_SECONDS = 5; public static void syncAfterWrite(ESBulkProcessor bulkProcessor) throws InterruptedException { bulkProcessor.flush(); diff --git a/metadata-io/src/test/java/com/linkedin/metadata/ESTestFixtureUtils.java b/metadata-io/src/test/java/com/linkedin/metadata/ESTestFixtureUtils.java index 1f0b7b24397ca..914c5be9f5b09 100644 --- a/metadata-io/src/test/java/com/linkedin/metadata/ESTestFixtureUtils.java +++ b/metadata-io/src/test/java/com/linkedin/metadata/ESTestFixtureUtils.java @@ -15,6 +15,7 @@ import java.io.IOException; import java.util.Set; +import static com.linkedin.metadata.ESTestConfiguration.REFRESH_INTERVAL_SECONDS; import static com.linkedin.metadata.ESTestUtils.environmentRestClientBuilder; @TestConfiguration @@ -111,6 +112,7 @@ private void reindexTestFixtureData() throws IOException { FixtureReader reader = FixtureReader.builder() .bulkProcessor(bulkProcessor) .fixtureName("long_tail") + .refreshIntervalSeconds(REFRESH_INTERVAL_SECONDS) .build(); reader.read(); diff --git a/metadata-io/src/test/java/io/datahub/test/fixtures/elasticsearch/FixtureReader.java b/metadata-io/src/test/java/io/datahub/test/fixtures/elasticsearch/FixtureReader.java index 2b37d86f058db..a0c551b28b507 100644 --- a/metadata-io/src/test/java/io/datahub/test/fixtures/elasticsearch/FixtureReader.java +++ b/metadata-io/src/test/java/io/datahub/test/fixtures/elasticsearch/FixtureReader.java @@ -36,6 +36,8 @@ public class FixtureReader { @Builder.Default private String targetIndexPrefix = ""; + private long refreshIntervalSeconds; + public Set read() throws IOException { try (Stream files = Files.list(Paths.get(String.format("%s/%s", inputBase, fixtureName)))) { return files.map(file -> { @@ -64,7 +66,7 @@ public Set read() throws IOException { } finally { bulkProcessor.flush(); try { - Thread.sleep(1000); + Thread.sleep(1000 * refreshIntervalSeconds); } catch (InterruptedException ignored) { } }