From b0aaee27bc10d6992da57dd330a642e44ef29c2c Mon Sep 17 00:00:00 2001 From: Maxwell Brown Date: Mon, 23 Dec 2024 12:05:04 -0800 Subject: [PATCH] remove routing field integration test Signed-off-by: Maxwell Brown --- .../sink/opensearch/OpenSearchSinkIT.java | 26 ------------------- .../opensearch/index/IndexConfiguration.java | 1 - 2 files changed, 27 deletions(-) diff --git a/data-prepper-plugins/opensearch/src/integrationTest/java/org/opensearch/dataprepper/plugins/sink/opensearch/OpenSearchSinkIT.java b/data-prepper-plugins/opensearch/src/integrationTest/java/org/opensearch/dataprepper/plugins/sink/opensearch/OpenSearchSinkIT.java index 0d5d672938..0ac74d5975 100644 --- a/data-prepper-plugins/opensearch/src/integrationTest/java/org/opensearch/dataprepper/plugins/sink/opensearch/OpenSearchSinkIT.java +++ b/data-prepper-plugins/opensearch/src/integrationTest/java/org/opensearch/dataprepper/plugins/sink/opensearch/OpenSearchSinkIT.java @@ -1340,32 +1340,6 @@ public void testOpenSearchDocumentId(final String testDocumentIdField) throws IO sink.shutdown(); } - @ParameterizedTest - @ValueSource(strings = {"info/ids/rid", "rid"}) - public void testOpenSearchRoutingField(final String testRoutingField) throws IOException, InterruptedException { - final String expectedRoutingField = UUID.randomUUID().toString(); - final String testIndexAlias = "test_index"; - final Event testEvent = JacksonEvent.builder() - .withData(Map.of("arbitrary_data", UUID.randomUUID().toString())) - .withEventType("event") - .build(); - testEvent.put(testRoutingField, expectedRoutingField); - - final List> testRecords = Collections.singletonList(new Record<>(testEvent)); - - Map metadata = initializeConfigurationMetadata(null, testIndexAlias, null); - metadata.put(IndexConfiguration.ROUTING_FIELD, testRoutingField); - final OpenSearchSinkConfig openSearchSinkConfig = generateOpenSearchSinkConfigByMetadata(metadata); - final OpenSearchSink sink = createObjectUnderTest(openSearchSinkConfig, true); - sink.output(testRecords); - - final List routingFields = getSearchResponseRoutingFields(testIndexAlias); - for (String routingField : routingFields) { - assertThat(routingField, equalTo(expectedRoutingField)); - } - sink.shutdown(); - } - @ParameterizedTest @ValueSource(strings = {"", "info/ids/rid", "rid"}) public void testOpenSearchRouting(final String testRouting) throws IOException, InterruptedException { diff --git a/data-prepper-plugins/opensearch/src/main/java/org/opensearch/dataprepper/plugins/sink/opensearch/index/IndexConfiguration.java b/data-prepper-plugins/opensearch/src/main/java/org/opensearch/dataprepper/plugins/sink/opensearch/index/IndexConfiguration.java index a80c9125d6..8a2d1ffe01 100644 --- a/data-prepper-plugins/opensearch/src/main/java/org/opensearch/dataprepper/plugins/sink/opensearch/index/IndexConfiguration.java +++ b/data-prepper-plugins/opensearch/src/main/java/org/opensearch/dataprepper/plugins/sink/opensearch/index/IndexConfiguration.java @@ -55,7 +55,6 @@ public class IndexConfiguration { public static final String MAX_LOCAL_COMPRESSIONS_FOR_ESTIMATION = "max_local_compressions_for_estimation"; public static final String FLUSH_TIMEOUT = "flush_timeout"; public static final String DOCUMENT_ID = "document_id"; - public static final String ROUTING_FIELD = "routing"; public static final String ROUTING = "routing"; public static final String PIPELINE = "pipeline"; public static final String ISM_POLICY_FILE = "ism_policy_file";