diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/progress/ProgressContantsTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/progress/ProgressContantsTest.java index c29b96c9850..b18785a9681 100644 --- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/progress/ProgressContantsTest.java +++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/progress/ProgressContantsTest.java @@ -223,6 +223,8 @@ public void testKeepOneProperty() throws Exception { errorJob.schedule(); processEventsUntil(() -> findProgressInfoItem(errorJob) != null, 3000); } + // Wait for KEEPONE cleanup to stabilize at exactly 1 item + processEventsUntil(() -> countBelongingProgressItems(DummyFamilyJob.class) == 1, 3000); assertEquals("Only one finished job should be kept in view", 1, countBelongingProgressItems(DummyFamilyJob.class)); @@ -254,8 +256,8 @@ public void testKeepOneProperty() throws Exception { errorJob.schedule(); processEventsUntil(() -> findProgressInfoItem(errorJob) != null, 3000); } - // Additional event processing to ensure all KEEPONE logic has completed - processEvents(); + // Wait for KEEPONE cleanup to stabilize at exactly 1 item + processEventsUntil(() -> countBelongingProgressItems(DummyFamilyJob.class) == 1, 5000); assertEquals("Only one finished job should be kept in view", 1, countBelongingProgressItems(DummyFamilyJob.class));