From bffd23329b3b6f0cd6431a59dfd93c657602da20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Pi=C3=B1a?= Date: Fri, 13 Dec 2024 16:50:04 -0500 Subject: [PATCH] refactor: minor refactor in test class Co-authored-by: Mijail Rondon --- .../canary/aggregator/topology/MetricsTopologyTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/canary/src/test/java/io/littlehorse/canary/aggregator/topology/MetricsTopologyTest.java b/canary/src/test/java/io/littlehorse/canary/aggregator/topology/MetricsTopologyTest.java index 8b7a23ce8..afb90b3ed 100644 --- a/canary/src/test/java/io/littlehorse/canary/aggregator/topology/MetricsTopologyTest.java +++ b/canary/src/test/java/io/littlehorse/canary/aggregator/topology/MetricsTopologyTest.java @@ -177,11 +177,12 @@ void calculateCountAndLatencyForWfRunRequest() { void includeBeatTagsIntoMetrics() { BeatType expectedType = BeatType.WF_RUN_REQUEST; String expectedTypeName = expectedType.name().toLowerCase(); + Map expectedTags = Map.of("my_tag", "value"); - inputTopic.pipeInput(newBeat(expectedType, getRandomId(), 20L, "ok", Map.of("my_tag", "value"))); + inputTopic.pipeInput(newBeat(expectedType, getRandomId(), 20L, "ok", expectedTags)); assertThat(getCount()).isEqualTo(3); - assertThat(store.get(newMetricKey("canary_" + expectedTypeName + "_avg", "ok", Map.of("my_tag", "value")))) + assertThat(store.get(newMetricKey("canary_" + expectedTypeName + "_avg", "ok", expectedTags))) .isEqualTo(newMetricValue(20.)); }