Skip to content

Commit 521575a

Browse files
fix tests
1 parent 6080247 commit 521575a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/com/magento/idea/magento2plugin/BaseProjectTestCase.java

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
package com.magento.idea.magento2plugin;
77

88
import com.intellij.openapi.util.text.StringUtil;
9+
import com.intellij.testFramework.IndexingTestUtil;
910
import com.intellij.testFramework.PlatformTestUtil;
1011
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
1112
import com.magento.idea.magento2plugin.indexes.IndexManager;
@@ -50,20 +51,23 @@ protected void enablePluginAndReindex() {
5051
settings.mftfSupportEnabled = true;
5152
IndexManager.manualReindex();
5253
PlatformTestUtil.dispatchAllEventsInIdeEventQueue();
54+
IndexingTestUtil.waitUntilIndexesAreReady(myFixture.getProject());
5355
}
5456

5557
protected void disablePluginAndReindex() {
5658
final Settings settings = Settings.getInstance(myFixture.getProject());
5759
settings.pluginEnabled = false;
5860
IndexManager.manualReindex();
5961
PlatformTestUtil.dispatchAllEventsInIdeEventQueue();
62+
IndexingTestUtil.waitUntilIndexesAreReady(myFixture.getProject());
6063
}
6164

6265
protected void disableMftfSupportAndReindex() {
6366
final Settings settings = Settings.getInstance(myFixture.getProject());
6467
settings.mftfSupportEnabled = false;
6568
IndexManager.manualReindex();
6669
PlatformTestUtil.dispatchAllEventsInIdeEventQueue();
70+
IndexingTestUtil.waitUntilIndexesAreReady(myFixture.getProject());
6771
}
6872

6973
protected String prepareFixturePath(

0 commit comments

Comments
 (0)