diff --git a/platform/testFramework/src/com/intellij/testFramework/InspectionTestUtil.java b/platform/testFramework/src/com/intellij/testFramework/InspectionTestUtil.java index 1e78fd558423..7baeab83b12f 100644 --- a/platform/testFramework/src/com/intellij/testFramework/InspectionTestUtil.java +++ b/platform/testFramework/src/com/intellij/testFramework/InspectionTestUtil.java @@ -163,6 +163,7 @@ public final class InspectionTestUtil { public static void runTool(@NotNull InspectionToolWrapper toolWrapper, @NotNull final AnalysisScope scope, @NotNull final GlobalInspectionContextForTests globalContext) { + IndexingTestUtil.waitUntilIndexesAreReady(scope.getProject()); final String shortName = toolWrapper.getShortName(); final HighlightDisplayKey key = HighlightDisplayKey.find(shortName); if (key == null){