From d51709042668b35d1fe184ad86d973d401e1a9fb Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Thu, 8 Oct 2026 08:41:07 +0200 Subject: [PATCH] Wait for the reconciler to become inactive in pollUntilClean MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The reconciler worker clears its dirty flag and only afterwards its active flag. pollUntilClean() waited for the dirty flag alone, so a following assertFalse(isActive()) could run in between and fail, as seen on macOS in testReplacingDocumentWhenClean. Assisted-by: multiple AI agents and layers of automated tooling 🤖 --- .../jface/text/tests/reconciler/AbstractReconcilerTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/reconciler/AbstractReconcilerTest.java b/tests/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/reconciler/AbstractReconcilerTest.java index 851c30f8a34..4cc5c2f14d2 100644 --- a/tests/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/reconciler/AbstractReconcilerTest.java +++ b/tests/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/reconciler/AbstractReconcilerTest.java @@ -482,9 +482,9 @@ void installDocument() throws InterruptedException { } void pollUntilClean() throws InterruptedException { - // wait for reconciler to become clean + // the worker clears the dirty flag before the active flag, so wait for both long start= System.currentTimeMillis(); - while (isDirty()) { + while (isDirty() || isActive()) { long current= System.currentTimeMillis(); if (current > start + 5000) fail("waited > 5s for reconciler to complete");