Skip to content

Commit

Permalink
refactor: minor refactor in test class
Browse files Browse the repository at this point in the history
Co-authored-by: Mijail Rondon <[email protected]>
  • Loading branch information
sauljabin and mijailr committed Dec 13, 2024
1 parent 0abe27e commit bffd233
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,12 @@ void calculateCountAndLatencyForWfRunRequest() {
void includeBeatTagsIntoMetrics() {
BeatType expectedType = BeatType.WF_RUN_REQUEST;
String expectedTypeName = expectedType.name().toLowerCase();
Map<String, String> 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.));
}

Expand Down

0 comments on commit bffd233

Please sign in to comment.