Disable write action for intention test start

2016.1 doesn't start actions by default and run isAvailable in pooled thread

With write action tests won't proccess as it's imposible to take read action from pooled thread.
Problem introduce in 3c97ae4c5c
This commit is contained in:
Nikolay Krasko
2016-05-27 19:09:04 +03:00
parent 6157d3d8a2
commit 8a1fa27c39

View File

@@ -142,6 +142,11 @@ public abstract class AbstractIntentionTest extends KotlinCodeInsightTestCase {
}
}
@Override
protected boolean isRunInWriteAction() {
return false;
}
private void doTestFor(String mainFilePath, Map<String, PsiFile> pathToFiles, final IntentionAction intentionAction, String fileText) throws Exception {
String isApplicableString = InTextDirectivesUtils.findStringWithPrefixes(fileText, "// IS_APPLICABLE: ");
boolean isApplicableExpected = isApplicableString == null || isApplicableString.equals("true");