diff --git a/data-prepper-expression/src/test/java/org/opensearch/dataprepper/expression/ParseTreeEvaluatorListenerTest.java b/data-prepper-expression/src/test/java/org/opensearch/dataprepper/expression/ParseTreeEvaluatorListenerTest.java index 9b517d8ae0..f0e1fdb9f4 100644 --- a/data-prepper-expression/src/test/java/org/opensearch/dataprepper/expression/ParseTreeEvaluatorListenerTest.java +++ b/data-prepper-expression/src/test/java/org/opensearch/dataprepper/expression/ParseTreeEvaluatorListenerTest.java @@ -193,7 +193,7 @@ void testSimpleRelationalOperatorExpressionWithInValidLiteralType() { @Test void testSimpleRelationalOperatorExpressionWithJsonPointerTypeValidValue() { final String testKey = "testKey"; - final int testValue = random.nextInt(1000); + final int testValue = random.nextInt(1000) + 2; final Map data = Map.of(testKey, testValue); final Event testEvent = createTestEvent(data); final String greaterThanStatement = String.format(" /%s > %d", testKey, testValue - 1); @@ -207,7 +207,7 @@ void testSimpleRelationalOperatorExpressionWithJsonPointerTypeValidValue() { } @Test - void testSimpleRelationalOperatorExpressionWithJsonPointerTypeInValidValue() { + void testSimpleRelationalOperatorExpressionWithJsonPointerTypeInValidValueWithPositiveInteger() { final String testKey = "testKey"; final boolean testValue = true; final Map data = Map.of(testKey, testValue); diff --git a/data-prepper-plugins/otel-logs-source/src/test/java/org/opensearch/dataprepper/plugins/source/otellogs/OTelLogsSourceTest.java b/data-prepper-plugins/otel-logs-source/src/test/java/org/opensearch/dataprepper/plugins/source/otellogs/OTelLogsSourceTest.java index eee926a698..64a7f341cf 100644 --- a/data-prepper-plugins/otel-logs-source/src/test/java/org/opensearch/dataprepper/plugins/source/otellogs/OTelLogsSourceTest.java +++ b/data-prepper-plugins/otel-logs-source/src/test/java/org/opensearch/dataprepper/plugins/source/otellogs/OTelLogsSourceTest.java @@ -89,6 +89,7 @@ import java.util.stream.Stream; import java.util.zip.GZIPOutputStream; +import static org.hamcrest.Matchers.hasItem; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.opensearch.dataprepper.plugins.source.otellogs.OTelLogsSourceConfig.DEFAULT_PORT; import static org.opensearch.dataprepper.plugins.source.otellogs.OTelLogsSourceConfig.DEFAULT_REQUEST_TIMEOUT_MS; @@ -800,8 +801,9 @@ private void assertSecureResponseWithStatusCode(final AggregatedHttpResponse res .stream() .map(Map.Entry::getKey) .map(AsciiString::toString) + .map(String::toLowerCase) .collect(Collectors.toList()); - assertThat("Response Header Keys", headerKeys, not(contains("server"))); + assertThat("Response Header Keys", headerKeys, not(hasItem("server"))); } private byte[] createGZipCompressedPayload(final String payload) throws IOException {