From 6f98bec3ffc491714049399f61a8a4959ea5a19b Mon Sep 17 00:00:00 2001 From: James Rosewell Date: Sun, 15 Nov 2026 03:49:01 +0000 Subject: [PATCH] Keep the configured interval test's update check from running before its verify With no polling interval, registerDataFile schedules the check after a random number of whole seconds below 600, which is 0 about once in 600 registrations. The test's future factory runs the check on a real executor, and a check that finds no update schedules again, so the test then saw two schedule calls where it verifies one. That failed Ubuntu_Java_17 in full build 43667464820. The test now has the factory return a future that never runs, as it checks only the delay. --- .../pipeline/engines/services/DataUpdateServiceTests.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pipeline/pipeline.engines/src/test/java/fiftyone/pipeline/engines/services/DataUpdateServiceTests.java b/pipeline/pipeline.engines/src/test/java/fiftyone/pipeline/engines/services/DataUpdateServiceTests.java index 0d1796004..6f139fca2 100644 --- a/pipeline/pipeline.engines/src/test/java/fiftyone/pipeline/engines/services/DataUpdateServiceTests.java +++ b/pipeline/pipeline.engines/src/test/java/fiftyone/pipeline/engines/services/DataUpdateServiceTests.java @@ -289,6 +289,13 @@ public void DataUpdateService_Register_AutoUpdateConfiguredInterval() { file.setEngine(engine); file.setConfiguration(config); + // With no polling interval the delay is the random number of whole + // seconds alone, which can be 0. The check is not run, so a check + // that starts at once cannot schedule again before the verify. + doReturn(mock(ScheduledFuture.class)).when(futureFactory).schedule( + any(Runnable.class), + anyLong()); + // Act dataUpdate.registerDataFile(file);