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.
Often when showing test results from deadlock, "No test passed, 1 test failed" is displayed at the top of the window, and the error bar ("0.00 %") is animated, but no test information appears. Meanwhile the Output Window gets the full information including stack trace (and its title bar is unboldfaced so it seems quiescent).
*** Bug 202680 has been marked as a duplicate of this bug. ***
FYI: was able to reproduce on windows 7 box with these steps: - created anagram game - made it versioned in Git - created new job fo local hudson - added new JUnit test with failing test method (just assert false : "foo") - started job from IDE - got bubble notification with test failures ---> output was empty hudson itself not running on some "space in path" location. Used version 2.1.2
Happens sometimes, but not consistently reproducible.
Log output when working correctly: FINER [org.netbeans.modules.hudson.api.ConnectionBuilder]: Trying to open http://localhost:8080/job/AnagramGame/2/testReport/api/xml?xpath=//suite[case/errorStackTrace]&wrapper=failures FINER [org.netbeans.modules.hudson.api.ConnectionBuilder]: => 200 FINE [org.netbeans.modules.hudson.ui.actions.ShowFailures]: got com.toy.anagrams.lib.BrokenTest.testHello as FAILED FINE [org.netbeans.modules.gsf.testrunner.api.Manager]: Finishing session: org.netbeans.modules.gsf.testrunner.api.TestSession@9ec4a6 FINE [org.netbeans.modules.gsf.testrunner.api.ResultDisplayHandler]: Invoking: displayMsg with param: Running... FINE [org.netbeans.modules.gsf.testrunner.api.RootNode]: Setting display name to: 'Running...'. Total tests run: 0. Session finished: false FINE [org.netbeans.modules.gsf.testrunner.api.ResultDisplayHandler]: Invoking: displaySuiteRunning with param: com.toy.anagrams.lib.BrokenTest FINE [org.netbeans.modules.gsf.testrunner.api.ResultDisplayHandler]: Invoking: displayReport with param: org.netbeans.modules.gsf.testrunner.api.Report@a8df4f FINE [org.netbeans.modules.gsf.testrunner.api.RootNode]: Setting display name to: 'No test passed, 1 test failed.(0.0 s) Running...'. Total tests run: 1. Session finished: false FINE [org.netbeans.modules.gsf.testrunner.api.ResultDisplayHandler]: Invoking: displayMsgSessionFinished with param: null FINE [org.netbeans.modules.gsf.testrunner.api.RootNode]: Setting display name to: 'No test passed, 1 test failed.(0.0 s)'. Total tests run: 1. Session finished: true and when not: FINER [org.netbeans.modules.hudson.api.ConnectionBuilder]: Trying to open http://localhost:8080/job/AnagramGame/2/testReport/api/xml?xpath=//suite[case/errorStackTrace]&wrapper=failures FINER [org.netbeans.modules.hudson.api.ConnectionBuilder]: => 200 FINE [org.netbeans.modules.hudson.ui.actions.ShowFailures]: got com.toy.anagrams.lib.BrokenTest.testHello as FAILED FINE [org.netbeans.modules.gsf.testrunner.api.Manager]: Finishing session: org.netbeans.modules.gsf.testrunner.api.TestSession@1c24931 FINE [org.netbeans.modules.gsf.testrunner.api.RootNode]: Setting display name to: 'No test passed, 1 test failed.(0.0 s)'. Total tests run: 1. Session finished: false The key to reproducing is that the Test Results window must initially be closed. I think the problem is that the report is displayed after the session is marked finished, due to threading in gsf.testrunner.
Specifically, I think some events are routed through displayInDispatchThread whereas others are not; the result is that events are received by the GUI component in a different order than they were sent from the Manager. The first difference I can find is that if TR was initially not open, ResultDisplayHandler.displayMessage returns early because treePanel == null. It is supposed to defend against this in setTreePanel by showing the message retroactively, but I guess that is not working.
In recent dev builds I have seen this a lot but from running tests locally, not only from Hudson.
In fact seems to happen most of the time now (20120410-c5d030bb204a), perhaps triggered by recent changes in Test Results focus policy. It makes the TR window useless since it only displays a summary but no details.
Jesse thank you for the evaluation. You are correct that recent changes in TRW focus policy made the problem more obvious. The problem was that if the TRW was not really visible no nodes were added to the tree and so when you opened it from the notification bubble or from the Window->Output menu only a summary was shown. I think this fixes the problem: http://hg.netbeans.org/core-main/rev/91b93f3392c3 Could someone please verify it? Thank you
Fix seems to be working from what I can see so far.
Integrated into 'main-golden', will be available in build *201204130400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/91b93f3392c3 User: Theofanis Oikonomou <theofanis@netbeans.org> Log: Issue #202777 - Test Results window claims there is a failure but does not show it