diff --git a/log4j2-appender/src/test/java/pl/tkowalcz/tjahzi/log4j2/labels/LabelsContextSubstitutionTest.java b/log4j2-appender/src/test/java/pl/tkowalcz/tjahzi/log4j2/labels/LabelsContextSubstitutionTest.java index d08ff1f..53d3f4e 100644 --- a/log4j2-appender/src/test/java/pl/tkowalcz/tjahzi/log4j2/labels/LabelsContextSubstitutionTest.java +++ b/log4j2-appender/src/test/java/pl/tkowalcz/tjahzi/log4j2/labels/LabelsContextSubstitutionTest.java @@ -7,7 +7,7 @@ import pl.tkowalcz.tjahzi.log4j2.infra.IntegrationTest; import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.Matchers.contains; +import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.hasItems; import static org.hamcrest.core.Every.everyItem; import static pl.tkowalcz.tjahzi.log4j2.infra.LokiAssert.assertThat; @@ -38,9 +38,9 @@ void shouldSendData() { .returns(response -> response .body("data.result.size()", equalTo(3)) .body("data.result.stream.server", everyItem(equalTo("127.0.0.1"))) - .body("data.result.stream.object", contains("prefix_", "prefix_bus_ticket", "prefix_comb")) - .body("data.result.stream.owner", contains("_suffix", "wally_suffix", "jennifer_suffix")) - .body("data.result.stream.default_value_test", contains("use_this_if_missing", "use_this_if_missing", "use_this_if_missing")) + .body("data.result.stream.object", containsInAnyOrder("prefix_", "prefix_bus_ticket", "prefix_comb")) + .body("data.result.stream.owner", containsInAnyOrder("_suffix", "wally_suffix", "jennifer_suffix")) + .body("data.result.stream.default_value_test", containsInAnyOrder("use_this_if_missing", "use_this_if_missing", "use_this_if_missing")) .body("data.result.values", hasItems( hasItems(hasItems("LabelsContextSubstitutionTest - Test3")), diff --git a/log4j2-appender/src/test/java/pl/tkowalcz/tjahzi/log4j2/labels/Log4jPatternsInLabelsTest.java b/log4j2-appender/src/test/java/pl/tkowalcz/tjahzi/log4j2/labels/Log4jPatternsInLabelsTest.java index 44c0be4..2254791 100644 --- a/log4j2-appender/src/test/java/pl/tkowalcz/tjahzi/log4j2/labels/Log4jPatternsInLabelsTest.java +++ b/log4j2-appender/src/test/java/pl/tkowalcz/tjahzi/log4j2/labels/Log4jPatternsInLabelsTest.java @@ -35,7 +35,7 @@ void shouldSendData() { .body("data.result.stream.server", everyItem(equalTo("127.0.0.1"))) .body("data.result.stream.class_pattern", everyItem(equalTo("p.t.t.l.l.Log4jPatternsInLabelsTest"))) .body("data.result.stream.sequence_number", contains("2", "1")) - .body("data.result.stream.mdc_tid", contains("", "req-230rq9ubou")) + .body("data.result.stream.mdc_tid", contains(null, "req-230rq9ubou")) .body("data.result.values", hasItems( hasItems(hasItems("Log4jPatternsInLabelsTest - Test2")),