From 446c509bb1c601a7acc11cf66a7fa4f2110144f0 Mon Sep 17 00:00:00 2001 From: Pepijn Schmitz Date: Wed, 5 Aug 2020 17:36:00 +0200 Subject: [PATCH] Expand unit test for #2176 --- .../core/instrument/binder/logging/Log4j2MetricsTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/micrometer-core/src/test/java/io/micrometer/core/instrument/binder/logging/Log4j2MetricsTest.java b/micrometer-core/src/test/java/io/micrometer/core/instrument/binder/logging/Log4j2MetricsTest.java index 0d930e0ba1..3b522fa0ce 100644 --- a/micrometer-core/src/test/java/io/micrometer/core/instrument/binder/logging/Log4j2MetricsTest.java +++ b/micrometer-core/src/test/java/io/micrometer/core/instrument/binder/logging/Log4j2MetricsTest.java @@ -171,7 +171,9 @@ void asyncLogShouldNotBeDuplicated() throws IOException { assertThat(registry.get("log4j2.events").tags("level", "info").counter().count()).isEqualTo(0); logger.info("Hello, world!"); - assertThat(registry.get("log4j2.events").tags("level", "info").counter().count()).isEqualTo(1); + logger.info("Hello, world!"); + logger.info("Hello, world!"); + assertThat(registry.get("log4j2.events").tags("level", "info").counter().count()).isEqualTo(3); } }