diff --git a/dataprovider-core/src/test/java/nl/hauntedmc/dataprovider/core/DataProviderRegistryTest.java b/dataprovider-core/src/test/java/nl/hauntedmc/dataprovider/core/DataProviderRegistryTest.java index 5cf684b..b88d744 100644 --- a/dataprovider-core/src/test/java/nl/hauntedmc/dataprovider/core/DataProviderRegistryTest.java +++ b/dataprovider-core/src/test/java/nl/hauntedmc/dataprovider/core/DataProviderRegistryTest.java @@ -748,6 +748,9 @@ void unregisterClosingAnOldSlotCannotUntrackTheReplacementRuntimeControl() throw assertTrue(registry.slotRemoved.await(5, TimeUnit.SECONDS)); registry.reloadConfiguration(); + // reloadConfiguration intentionally requests health asynchronously. Drain that request + // before taking the baseline so the post-close verification cannot reuse the same future. + registry.probeRemoteHealthAsync().join(); int probesBeforeOldClose = sharedTarget.probeCalls; registry.allowOldClose.countDown(); unregister.join();