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: | Test error/failure in editor.bracesmatching module | ||
---|---|---|---|
Product: | editor | Reporter: | tomwheeler <tomwheeler> |
Component: | -- Other -- | Assignee: | Svata Dedic <sdedic> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mmirilovic, sdedic |
Priority: | P2 | ||
Version: | 7.1 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
tomwheeler
2011-11-12 17:50:26 UTC
Further testing shows that the intermittent passes happen on Linux too, not just Windows. Here is an excerpt from a session in which the "ant test" in editor.bracesmatching failed, then the same command passed when run immediately afterwards. Tests with Thread.sleep statements like these are always suspect. $ ant test ... test-unit: [junit] Testsuite: org.netbeans.modules.editor.bracesmatching.MasterMatcherTest [junit] Tests run: 5, Failures: 1, Errors: 0, Time elapsed: 12.383 sec [junit] [junit] Testcase: testThreadResultsGCed(org.netbeans.modules.editor.bracesmatching.MasterMatcherTest): FAILED [junit] There should be no highlights [junit] junit.framework.AssertionFailedError: There should be no highlights [junit] at org.netbeans.modules.editor.bracesmatching.MasterMatcherTest.testBlockingByForLoop(MasterMatcherTest.java:240) [junit] at org.netbeans.modules.editor.bracesmatching.MasterMatcherTest.testThreadResultsGCed(MasterMatcherTest.java:249) [junit] at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:99) [junit] at org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:405) [junit] at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:331) [junit] at java.lang.Thread.run(Thread.java:662) [junit] [junit] [junit] Test org.netbeans.modules.editor.bracesmatching.MasterMatcherTest FAILED BUILD FAILED Total time: 15 seconds $ ant test ... test-unit: [junit] Testsuite: org.netbeans.modules.editor.bracesmatching.MasterMatcherTest [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 13.34 sec [junit] ... BUILD SUCCESSFUL Total time: 16 seconds Changeset: 6f7937bdaa49 Author: Svata Dedic <sdedic@netbeans.org> Date: 2011-11-15 13:37 Message: #205033: fixed race conditions in test, added INSANE dependency Issue #205033 - Test error/failure in editor.bracesmatching module: fixed Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/6f7937bdaa49 User: Svata Dedic <sdedic@netbeans.org> Log: #205033: fixed race conditions in test, added INSANE dependency Issue #205033 - Test error/failure in editor.bracesmatching module: fixed I just checked Hudson on deadlock: http://deadlock.netbeans.org/hudson/job/NB-Core-Build/7501/testReport/ and it still doesn't look like the tests in the editor.bracesmatching module are being run during build jobs. I would think that since this module has tests, they ought to get run with every build as they do for every other module. The tests shouldn't most likely be run for in the core-main builder, but rather on the jet-main builder, as the module belong to jet-main's "jurisdiction". (there are a lot of editor and Java tests that are not run by the core-main builder, so I see no reason why tests for this particular module should). I will add the module to the list in jet-main builder in a few days, after 7.1 is branched. http://bertram2.netbeans.org:8080/job/jet-main/ Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/7d4b67a0cb96 User: Jesse Glick <jglick@netbeans.org> Log: Fix of #205033 made project.xml invalid according to schema, resulting in console warnings when scanning module list. Next time use Alt-Shift-F9 to validate changes to XML, or simply use the GUI under Test Libraries. |