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.
When repeatedly running the same test class, sometimes both passed and failed tests are displayed in the results window and sometimes message appears that information about passed tests is not available. I would expect that for a particular configuration and test class, either the information is always available or never available.
Information about passed tests is taken from an XML file generated by the running tests. Before this file is used, its timestamp is compared with the time the test started to check that it is the XML file generated by the last test run. The bug appears if the XML file (report) is generated and saved during the same second as the test started. For example, test started on 13:27:18.148 (hh:mm:ss, the last part are milliseconds) and the file was generated on 13:27:18.973 The problem is that file's timestamp is not that precise - it does not hold information about milliseconds. So finally the following timestamps are compared: test start: 13:27:18.148 file timestamp: 13:27:18 The result of this comparison is that the file was last updated earlier than the test started so the file is obsolete and should not be used.
Fixed in the trunk. The fix was to ignore the milliseconds part of the test start time and only compare hours, minutes and seconds. Modified file: junit/src/org/netbeans/modules/junit/output/JUnitOutputReader.java (1.33) Diff: http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/JUnitOutputReader.java?r1=1.32&r2=1.33&diff_format=u