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.
In spite of our test is executed in AWT event thread, we sometimes get an exception related to nodes. I think it is something wrong in DB module because I haven't seen it in any other module. The following exception is thrown when we expand Databases node and searching for Drivers node: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.LinkedList.entry(LinkedList.java:360) at java.util.LinkedList.get(LinkedList.java:303) at org.openide.explorer.view.VisualizerNode.getChildAt(VisualizerNode.java:213) at javax.swing.tree.DefaultTreeModel.getChild(DefaultTreeModel.java:156) I must admit it happens only in automated tests and only sometimes. But it prevent us to write really stable tests. Tested in build 20040526-1710, JDK1.4.2_04, Solaris9.
Created attachment 15313 [details] Entire stack trace.
Children are created in a separate thred. Wait node is displayed till they are created. I think you should somehow check if wait node is displayed or not and continue your test when wait node is replaced by expected nodes. For more info see org.netbeans.modules.db.explorer.DatabaseNodeChildere.initCollection() method.
OK, I tried to make the test more robust. It waits until the wait node dismiss and then it looks for drivers node. It should help. But the cause of problem is that the wait node is not replaced in AWT thread. It should be solved in new implementation of DB module.
Test was updated so hopefully it should work now without problems.
Verified.