This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Create empty JUnit test throws exception | ||
---|---|---|---|
Product: | java | Reporter: | pribyl <pribyl> |
Component: | JUnit | Assignee: | Victor Vasilyev <vvg> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | arcnor, av-nb, mkhramov, pribyl |
Priority: | P2 | Keywords: | ERGONOMICS |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://statistics.netbeans.org/exceptions/detail.do?id=156372 | ||
Issue Type: | DEFECT | Exception Reporter: | 156372 |
Attachments: |
The IDE log after three sequential attempts to create JUnit test.
stacktrace |
Description
pribyl
2009-08-20 14:56:27 UTC
This problem is reproducible only with 'Features on Demand' turned on Build Configuration Note: To catch the bug additionally to the basic cluster the ide.ergonomics module should be also built. I confirm that the bug is reproducible on Product Version: NetBeans IDE Dev (Build 090819) Java: 1.6.0_13; Java HotSpot(TM) Client VM 11.3-b02 System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb) Userdir: C:\Documents and Settings\vvg\.netbeans\dev Created attachment 86534 [details]
The IDE log after three sequential attempts to create JUnit test.
Note, before each of three assertion errors there is a log record like this: SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.openide.WizardDescriptor$Listener$2$1 And, each assertion error caused by the org.openide.util.RequestProcessor$SlowItem with a message "task failed due to ..." I think, implementation of the junit module is correct and the bug is outside of that module. See the assertion point in the code of the junit module: http://hg.netbeans.org/main/file/1c5ab8f7d046/junit/src/org/netbeans/modules/junit/DefaultPlugin.java#l1020 Probably, the issue 20467 has a relation to this bug. Most likely a root cause of this issue is incorrect manipulation of the threads from viewpoint of AWT in a case when a feature is involved in activating. *** Issue 170810 has been marked as a duplicate of this issue. *** Jesse Glick has suggested to delete the assertion, because there aren't any reason to run code of wizards in the event queue dispatch thread. Hence, I've removed (actually commented out) all such assertions in the JUnit module. After this the bug is not reproducible and a JUnit test can be created without any problems. Fixed in the main trunk http://hg.netbeans.org/main/rev/7682a1c75ec4 Build: NetBeans IDE Dev (Build nbms-and-javadoc-3923-on-090911) VM: Java HotSpot(TM) Client VM, 14.1-b02, Java(TM) Platform, Standard Edition for Business, 1.6.0_15-b03 OS: Windows XP, 5.1, x86 User Comments: Stacktrace: java.lang.AssertionError at org.netbeans.modules.junit.DefaultPlugin.createTestActionCalled(DefaultPlugin.java:1020) at org.netbeans.modules.junit.plugin.JUnitPlugin$1.createTestActionCalled(JUnitPlugin.java:74) at org.netbeans.modules.junit.wizards.EmptyTestCaseWizardIterator.instantiate(EmptyTestCaseWizardIterator.java:294) at org.netbeans.modules.ide.ergonomics.newproject.DescriptionStep$2.instantiate(DescriptionStep.java:301) at org.netbeans.modules.ide.ergonomics.newproject.FeatureOnDemanWizardIterator.instantiate(FeatureOnDemanWizardIterator.java:187) at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1016) Created attachment 87606 [details]
stacktrace
|