Skip to content

Commit 4fa72fa

Browse files
committed
Fixed #1675: "AWT events are not allowed inside write action" exception while creating dialog window for resolving arguments ambiguity (tests)
1 parent 62e1ea8 commit 4fa72fa

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package fr.adrienbrault.idea.symfony2plugin.tests.action.quickfix;
2+
3+
import fr.adrienbrault.idea.symfony2plugin.action.quickfix.AddServiceXmlArgumentLocalQuickFix;
4+
import fr.adrienbrault.idea.symfony2plugin.tests.SymfonyLightCodeInsightFixtureTestCase;
5+
6+
import java.util.ArrayList;
7+
8+
public class AddServiceXmlArgumentLocalQuickFixTest extends SymfonyLightCodeInsightFixtureTestCase {
9+
10+
public void testStartInWriteAction() {
11+
var quickfix = new AddServiceXmlArgumentLocalQuickFix(new ArrayList<>());
12+
13+
// Prevents "AWT events are not allowed inside write action" exception
14+
// while creating dialog window for resolving arguments ambiguity
15+
assertFalse(quickfix.startInWriteAction());
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package fr.adrienbrault.idea.symfony2plugin.tests.intentions.php;
2+
3+
import fr.adrienbrault.idea.symfony2plugin.intentions.php.XmlServiceArgumentIntention;
4+
import fr.adrienbrault.idea.symfony2plugin.tests.SymfonyLightCodeInsightFixtureTestCase;
5+
6+
public class XmlServiceArgumentIntentionTest extends SymfonyLightCodeInsightFixtureTestCase {
7+
8+
public void testIntentionStartInReadThread() {
9+
var intention = new XmlServiceArgumentIntention();
10+
11+
// Prevents "AWT events are not allowed inside write action" exception
12+
// while creating dialog window for resolving arguments ambiguity
13+
assertFalse(intention.startInWriteAction());
14+
}
15+
}

0 commit comments

Comments
 (0)