From 46fb95530870ba5b9d28633f20f7b9b6f8bcc905 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Tue, 16 Sep 2014 15:21:00 +0400 Subject: [PATCH] pump events from EncodingProjectManagerImpl.reloadAllFilesUnder --- .../com/intellij/codeInsight/daemon/LossyEncodingTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LossyEncodingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LossyEncodingTest.java index 903905eb5c3a..6cf226623f92 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LossyEncodingTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LossyEncodingTest.java @@ -54,6 +54,12 @@ public class LossyEncodingTest extends DaemonAnalyzerTestCase { return new LocalInspectionTool[]{new LossyEncodingInspection()}; } + @Override + protected void tearDown() throws Exception { + UIUtil.dispatchAllInvocationEvents(); // invokeLater() in EncodingProjectManagerImpl.reloadAllFilesUnder() + super.tearDown(); + } + public void testText() throws Exception { doTest("Text.txt"); Charset ascii = CharsetToolkit.forName("US-ASCII"); @@ -115,6 +121,7 @@ public class LossyEncodingTest extends DaemonAnalyzerTestCase { private void doTest(@NonNls String filePath) throws Exception { doTest(BASE_PATH + "/" + filePath, true, false); + UIUtil.dispatchAllInvocationEvents(); } public void testNativeEncoding() throws Exception {