From cecb9247ed1335737e2f7b4d1619e48fb14c0949 Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 8 Jul 2010 15:31:31 +0100 Subject: [PATCH] don't let a huge number of invokeLater stick in the queue in test --- .../intellij/codeInsight/daemon/LightAdvHighlightingTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingTest.java index 3cd9b51b8961..f5ab4c4e6a5b 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingTest.java @@ -29,6 +29,7 @@ import com.intellij.psi.xml.XmlAttribute; import com.intellij.psi.xml.XmlTag; import com.intellij.psi.xml.XmlToken; import com.intellij.psi.xml.XmlTokenType; +import com.intellij.util.ui.UIUtil; import org.jdom.Element; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; @@ -290,6 +291,8 @@ public class LightAdvHighlightingTest extends LightDaemonAnalyzerTestCase { binary.getLOperand().replace(expression); binary.getROperand().replace(literal); + UIUtil.dispatchAllInvocationEvents(); + expression.replace(binary); PostprocessReformattingAspect.getInstance(getProject()).clear(); // OOM otherwise }