From 77b4eee4fa5fcfae4626ec90f5aa1082b27fe917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Fri, 30 Sep 2022 13:05:26 +0200 Subject: [PATCH] fix testCompleteActivationChar to not fail other test #75 testSyncFailureNPE failed because of late event handling --- .../text/tests/contentassist/AsyncContentAssistTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/contentassist/AsyncContentAssistTest.java b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/contentassist/AsyncContentAssistTest.java index 302a70a0a..751c1ffb9 100644 --- a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/contentassist/AsyncContentAssistTest.java +++ b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/contentassist/AsyncContentAssistTest.java @@ -156,6 +156,10 @@ public void testCompleteActivationChar() { display.timerExec(200, new Runnable() { @Override public void run() { + if (control.isDisposed()) { + // https://github.com/eclipse-platform/eclipse.platform.text/issues/75#issuecomment-1263429480 + return; // do not fail other unit tests + } control.forceFocus(); keyEvent.widget= control; keyEvent.type= SWT.KeyDown;