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.
Product Version: NetBeans IDE 6.5 (Build 200811100001) Java: 1.6.0_07; Java HotSpot(TM) 64-Bit Server VM 1.6.0_07-b06-57 System: Mac OS X version 10.5.6 running on x86_64; SJIS; en (nb) It seems that when we use stderr for displaying logs in JUnit tests, some lines will be lost rarely. I'll attach sample project and screenshot later. "MainTest.java" is simple. It will display "p1" ~ "p10" and "p1 log" ~ "p10 log". "p?" to stdout, "p? log" to stderr. Main.java: public String p1() { System.err.println("p1 log"); return "p1"; } MainTest.java @Test public void testP1() { System.out.println("p1"); Main instance = new Main(); String expResult = ""; String result = instance.p1(); assertEquals(expResult, result); fail("The test case is a prototype."); } On "JUnit Test Results" window, "p10 log" was lost in this case. --- main p1 p1 log p2 p2 log p3 log p3 p4 p4 log p5 p5 log p6 log p6 p7 p7 log p8 log p8 p9 log p9 p10 --- "p10 log" should be displayed at the end. It does not happen always. Please try 5 ~ 10 times. In the "Output" window, it looks correct. "p10 log" is displayed properly. ---- init: deps-jar: compile: compile-test-single: Testsuite: javaapplication11.MainTest main p1 p1 log p2 p2 log p3 log p3 p4 p4 log p5 p5 log p6 log p6 p7 p7 log p8 log p8 p9 log p9 p10 log p10 Tests run: 11, Failures: 1, Errors: 10, Time elapsed: 0.164 sec ------------- Standard Output --------------- main p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 ------------- ---------------- --------------- ------------- Standard Error ----------------- p1 log p2 log p3 log p4 log p5 log p6 log p7 log p8 log p9 log p10 log ------------- ---------------- --------------- ---
Created attachment 77265 [details] screenshot : "p10 log" is not displayed
Created attachment 77266 [details] sample project
Assigning issues from Michael to Andrey.
Not reproducible anymore. Looks like was fixed while rewriting ant events parser and switching to the Common Test Runner API.