Skip to content

Commit

Permalink
TIKA-4155, try again...
Browse files Browse the repository at this point in the history
  • Loading branch information
tballison committed Oct 16, 2023
1 parent b202275 commit a427bac
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,23 @@
@Testcontainers(disabledWithoutDocker = true)
public class TikaPipesOpenSearchTest extends TikaPipesXSearchBase {

private static final String DOCKER_IMAGE_NAME = "opensearchproject/opensearch:2.8.0";
private static final String DOCKER_IMAGE_NAME = "opensearchproject/opensearch:2.10.0";

private static long MEMORY_IN_BYTES = 4l * 1024l * 1024l * 1024l;

private static long MEMORY_SWAP_IN_BYTES = 64l * 1024l * 1024l * 1024l;
@Container
public static GenericContainer<?> OPEN_SEARCH_CONTAINER =
new GenericContainer<>(DockerImageName.parse(DOCKER_IMAGE_NAME))
.withExposedPorts(9200)
.withStartupTimeout(Duration.of(180, ChronoUnit.SECONDS))
.withEnv("discovery.type", "single-node");
.withEnv("discovery.type", "single-node")
.withCreateContainerCmdModifier( cmd -> {
cmd.getHostConfig()
.withMemory(MEMORY_IN_BYTES)
.withMemorySwap(MEMORY_SWAP_IN_BYTES);
});;



@BeforeEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ public void tearDown() throws Exception {
JsonResponse response = CLIENT.deleteIndex(OPEN_SEARCH_ENDPOINT_BASE + TEST_INDEX);
assertEquals(200, response.getStatus());
assertTrue(response.getJson().get("acknowledged").asBoolean());
//refresh to hope that the underlying index is actually deleted
JsonResponse refresh = CLIENT.getJson(OPEN_SEARCH_ENDPOINT_BASE + TEST_INDEX + "/_refresh");
}

@Test
Expand Down

0 comments on commit a427bac

Please sign in to comment.