Skip to content

Commit

Permalink
chore(jackson): update to released version of jackson (#8674)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-leifker authored Aug 26, 2023
1 parent d169ee8 commit 6bfd94c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 4 deletions.
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -225,6 +226,7 @@ public SearchService searchServiceHelper(
.bulkProcessor(_bulkProcessor)
.fixtureName(fixtureName)
.targetIndexPrefix(prefix)
.refreshIntervalSeconds(REFRESH_INTERVAL_SECONDS)
.build()
.read();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import java.util.Map;

import static com.linkedin.metadata.Constants.*;
import static com.linkedin.metadata.ESTestConfiguration.REFRESH_INTERVAL_SECONDS;


@TestConfiguration
Expand Down Expand Up @@ -154,6 +155,7 @@ protected LineageSearchService lineageSearchService(
.bulkProcessor(_bulkProcessor)
.fixtureName(fixtureName)
.targetIndexPrefix(prefix)
.refreshIntervalSeconds(REFRESH_INTERVAL_SECONDS)
.build()
.read();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public class FixtureReader {
@Builder.Default
private String targetIndexPrefix = "";

private long refreshIntervalSeconds;

public Set<String> read() throws IOException {
try (Stream<Path> files = Files.list(Paths.get(String.format("%s/%s", inputBase, fixtureName)))) {
return files.map(file -> {
Expand Down Expand Up @@ -64,7 +66,7 @@ public Set<String> read() throws IOException {
} finally {
bulkProcessor.flush();
try {
Thread.sleep(1000);
Thread.sleep(1000 * refreshIntervalSeconds);
} catch (InterruptedException ignored) {
}
}
Expand Down

0 comments on commit 6bfd94c

Please sign in to comment.