From cb15b9ac9d3e3125b6988efad9182cbdfee151b7 Mon Sep 17 00:00:00 2001 From: simonh5 Date: Mon, 25 Sep 2023 20:58:41 -0500 Subject: [PATCH] fix: fix flakiness in test HealthCheckConfigValidator#startValidationsShouldFailIfAHealthCheckConfiguredButNotRegistered --- .../dropwizard/health/HealthCheckConfigValidatorTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dropwizard-health/src/test/java/io/dropwizard/health/HealthCheckConfigValidatorTest.java b/dropwizard-health/src/test/java/io/dropwizard/health/HealthCheckConfigValidatorTest.java index db9c41c05c1..404b25bc9fc 100644 --- a/dropwizard-health/src/test/java/io/dropwizard/health/HealthCheckConfigValidatorTest.java +++ b/dropwizard-health/src/test/java/io/dropwizard/health/HealthCheckConfigValidatorTest.java @@ -147,8 +147,10 @@ void startValidationsShouldFailIfAHealthCheckConfiguredButNotRegistered() throws .contains(" * check-3"); assertThat(logEvent.getFormattedMessage()) .contains(" * check-3"); - assertThat(e.getMessage()) - .contains("[check-3, check-2]"); + assertThat(e.getMessage()).satisfiesAnyOf( + message -> assertThat(message).contains("[check-3, check-2]"), + message -> assertThat(message).contains("[check-2, check-3]") + ); } } }