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.
Since May 12 some cnd unit tests failed. See log.
Created attachment 82015 [details] exception
I can confirm the test fails on Linux (JDK1.5, JDK1.6) and Solaris (JDK1.6). It passes on Solaris (JDK1.5) and Windows (JDK1.5, JDK1.6). But it fails on all history builds I have (since build 200904260201). It is not a regression. Do you know when the test started to fail?
CND has own incremental build: http://elif.russia.sun.com:8080/hudson/job/cnd-incremental-build/ test start to fail since #2808 (12.05.2009 18:51:32)
vkvashin: Please, comment status of incremental build.
I'd like to mention that the situation first occurred on May 12, and reproduces quite stable starting from this period. I can also reproduce it if I run tests on Solaris 10 remotely, i.e. via ssh, without DISPLAY variable set. I just do cd cnd.makeproject ant test
tests are very important for us, please, provide at least workaround
Work around is simple: run tests on jdk1.5 But it is very strange to see awt objects in UI less unit tests. IMHO it should be fixed (because it can appear in other use cases).
It is indeed not sad if unit tests fail due to access to AWT. But I am not sure what could be cause of the failure. Last change in core.startup was changeset: 130145:9578d8c64ae1 user: Jesse Glick <jglick@netbeans.org> date: Tue May 05 13:18:32 2009 -0400 summary: #164510: faster impl of shouldDelegateClasspathResource. Anyway I'd suggest a fix in the following place org.netbeans.core.startup.Main.setStatusText(Main.java:83) The fix shall check Toolkit.isHeadlessMode() (or something similar) and in such case don't try to call into Splash at all. Or catch and log the exception, but continue to run on.
The problem is in this line System.setProperty("os.name", "Windows Vista"); If you remove it, it starts to work on Linux too. Probably not a good idea to set this system property.
Your approach prevents developers from writing platform dependent unit tests :-(
fixed in change set http://hg.netbeans.org/cnd-main/rev/db82d1ea6d1b
By the way org.openide.util.UtilitiesTest sets OS property. It would be nice to provide developers a method to reset OS in unit tests.