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.
Majority of tests executed on JDK1.5.0-b20 failed because menu pushing timed out (see attached log). It is not clear why it fails but it happens when a modal dialog is opened before. To reproduce try to run attached test case in NetBeans by internal executor. It doesn't work in SHORTCUT mode on LINUX. It works on windows, on JDK1.4.2 and in QUEUE mode.
Created attachment 11706 [details] jemmy log
Created attachment 11707 [details] Test case
This issue is becomming very important since we want run our automated tests on JDK 1.5.0 to assure IDE compatibility and also as a part of JDK CAP program. Is there any new info. Thanks.
Yet, I did not find what the root of the problem is. Menu seems ignoring some events if previously (just before that) some other menu operation was performed. I'll provide the corect fix as soon as I find out what that "just before" means. Meanwile, I've added several QueueTool.waitEmpty(), which seems to make tests kinda more stable. Then, for this particular problem I've changed WindowOperator.close() to actually wait for window to be closed. These makes second menu operation passing correctly. I does not help to pass first menu operation after second though. Please try to use 2.2.4.dev version (from the top of trunk) to see if the changes help. If not, temporarily - until I find what's the problem is, you have to use APIJMenuDriver - it seems to be working stable: org.netbeans.jemmy.drivers.DriverManager.setMenuDriver(new org.netbeans.jemmy.drivers.menus.APIJMenuDriver()); Anyway - let me know if it helps.
Use of APIJMenuDriver helps to solve problems with pushing main menu. There exist tests which failed on "Menu pushing" but it is not as many as before. But now tests failed with message "Wait Popup menu loaded".
Last trunk changes (2.2.4.2) contain possible workaround. Could you, please, try it? Still do not know what is the real problem, but calling QueueTool.waitEmpty() several time one after enother (three is enough) allows to execute the test 1000 times. Still I am able to reproduce the problem _only_ for 1.5 _and_ Linux _and_ Gnome. Do you see it for other patforms?
Previously attached test case works well both on windows and linux for me. But with jemmy 2.2.4.2 doesn't work popup menu pushed by jemmy. It doesn't work only on Linux/Gnome both in SHORTCUT and QUEUE dispatching model. I will attach standalone java application which demonstrates the failure. Run it by command: java -cp "testPopup.zip:jemmy.jar" TestPopup15
Created attachment 11890 [details] Java application to test popup menu failure.
That seems to be a different problem from reported originally. Anyway, if you modify one methid in MenuTestFrame1: private void jTextArea1MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTextArea1MousePressed JemmyProperties.getCurrentOutput().printLine("" + evt.isPopupTrigger() + ": " + evt); if (evt.isPopupTrigger()) { jPopupMenu1.show(evt.getComponent(), evt.getX(), evt.getY()); JemmyProperties.getCurrentOutput().printLine("MUST BE SHOWN BY NOW!"); } }//GEN-LAST:event_jTextArea1MousePressed you will see that JPopupMenu.show(Component, int, int) _get_ executed: true: java.awt.event.MouseEvent[MOUSE_PRESSED,(194,137),...] on javax.swing.JTextArea[,0,0,388x274,...] MUST BE SHOWN BY NOW! So this is not, really, bug in jemmy. We only can talk about workaround, which I can not think of, as of right now. I leave the issue opened for now - until I figure out a good workaround or solution.
The popup menu problem was filed as issue 4940253 against JDK1.5. What next with the main menu problem? It is somehow worked around in Jemmy and it seems it works. So, is it also a bug in JDK or is is possible to find any permanent solution in Jemmy?
What's the status of this issue as the main bug in JDK has been already fixed?
Not yet verified.
Bug 4940253 against JDK1.5 has been resolved. I verified it with JDK1.5.0-b33. It means there should not be any problem in Jemmy.
Verified.