From 4f2f32b468ca6087264cff9dacbb6f6f7af26214 Mon Sep 17 00:00:00 2001 From: Tim Quinn Date: Mon, 11 Dec 2023 18:20:36 -0600 Subject: [PATCH] 3.x - Slightly relax a unit test to avoid test ordering issues (#8139) * Slightly relax a unit test to check for a SimpleTimer being updated AT LEAST once instead of exactly once to avoid test ordering issues * Copyright --- .../java/io/helidon/microprofile/metrics/TestStereotypes.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microprofile/metrics/src/test/java/io/helidon/microprofile/metrics/TestStereotypes.java b/microprofile/metrics/src/test/java/io/helidon/microprofile/metrics/TestStereotypes.java index c7f56efee66..dc61e5693ec 100644 --- a/microprofile/metrics/src/test/java/io/helidon/microprofile/metrics/TestStereotypes.java +++ b/microprofile/metrics/src/test/java/io/helidon/microprofile/metrics/TestStereotypes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. + * Copyright (c) 2022, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -70,6 +70,6 @@ void testMethodLevelStereotype() { SimpleTimer simpleTimer = metricRegistry.getSimpleTimer(new MetricID(StereotypeB.SIMPLE_TIMER_NAME)); assertThat("Simple timer registered via stereotype", simpleTimer, notNullValue()); - assertThat("Simple timer count", simpleTimer.getCount(), equalTo(1L)); + assertThat("Simple timer count", simpleTimer.getCount(), greaterThanOrEqualTo(1L)); } }