Skip to content

Commit

Permalink
remove routing field integration test
Browse files Browse the repository at this point in the history
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
  • Loading branch information
Galactus22625 committed Dec 23, 2024
1 parent 8fa8501 commit b0aaee2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<Record<Event>> testRecords = Collections.singletonList(new Record<>(testEvent));

Map<String, Object> 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<String> 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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit b0aaee2

Please sign in to comment.