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.

Bug 44790 - Jemmy/Jelly eat exception when occurs
Summary: Jemmy/Jelly eat exception when occurs
Status: CLOSED WORKSFORME
Alias: None
Product: qa
Classification: Unclassified
Component: Jellytools (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@qa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-13 15:43 UTC by Marian Mirilovic
Modified: 2006-03-24 10:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Mirilovic 2004-06-13 15:43:06 UTC
[200406101800]

Use case:
- I try to get a project node from Projects tab :
new
ProjectsTabOperator().getProjectRootNode("MyProject");
- BUT Projects tab is closed

- jemmy.log file contains logs:
--------------------------------
Trace:
Start to wait action "No event under
11111110111111111111 event mask during 1000
milliseconds"
Trace:
"No event under 11111110111111111111 event mask
during 1000 milliseconds" action has been produced
in 1019 milliseconds with result 
    : Reached!
Using
org.netbeans.jemmy.drivers.DefaultDriverInstaller
driver installer
Trace:
Start to wait action "Wait TopComponent with
name=Projects index=0
subchooser=org.netbeans.modules.projects.ui.ProjectTab
loaded"
Error:
"Wait TopComponent with name=Projects index=0
subchooser=org.netbeans.modules.projects.ui.ProjectTab
loaded" action has not been produced in 30017
milliseconds
------------------------

and my test fails, in despite of I have all of
this code in try/catch block !

I would like to see something like
TimeOutExpiredException with possibility catch
this exception and do appropriate actions.
Comment 1 Jiri Skrivanek 2004-06-14 09:44:29 UTC
Works for me. The following exception is thrown. What is your stack
trace when the test fails?

org.netbeans.jemmy.TimeoutExpiredException: Wait TopComponent with
name=Projects index=0
subchooser=org.netbeans.modules.projects.ui.ProjectTab loaded
        at org.netbeans.jemmy.Waiter.waitAction(Waiter.java:140)
        at
org.netbeans.jellytools.TopComponentOperator.waitTopComponent(TopComponentOperator.java:442)
        at
org.netbeans.jellytools.ProjectsTabOperator.<init>(ProjectsTabOperator.java:54)
Comment 2 Marian Mirilovic 2004-06-16 07:24:41 UTC
Jirka, 

there is nested exception, but somebody catch TomeoutExceptions and
throw *fail* instead.

Use case:
- I try to invoke poppu menu 
-> popup menu doesn't come
- so I encapsulate this code to try/catch block
-> It doesn't work, because there is no exception !!!

log:
--------------
      org.netbeans.junit.AssertionFailedErrorException: Popup menu
	at org.netbeans.jellytools.JellyTestCase.runBare(JellyTestCase.java:139)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at org.netbeans.junit.NbTestCase.run(NbTestCase.java:119)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at
org.netbeans.xtest.testrunner.JUnitTestRunner.runTests(JUnitTestRunner.java:173)
	at
org.netbeans.xtest.testrunner.JUnitTestRunner.runTests(JUnitTestRunner.java:129)
	at org.netbeans.xtest.plugin.ide.MainWithExec.run(MainWithExec.java:187)
	at org.netbeans.xtest.plugin.ide.Main$2.run(Main.java:320)
	at java.lang.Thread.run(Thread.java:595)

Nested Exception is:
org.netbeans.jemmy.TimeoutExpiredException: Popup menu
	at org.netbeans.jemmy.Waiter.waitAction(Waiter.java:140)
	at org.netbeans.jemmy.WindowWaiter.waitWindow(WindowWaiter.java:405)
	at org.netbeans.jemmy.WindowWaiter.waitWindow(WindowWaiter.java:195)
	at org.netbeans.jemmy.WindowWaiter.waitWindow(WindowWaiter.java:213)
	at
org.netbeans.jemmy.operators.JPopupMenuOperator.waitJPopupWindow(JPopupMenuOperator.java:223)
	at
org.netbeans.jemmy.operators.JPopupMenuOperator.callPopup(JPopupMenuOperator.java:297)
	at
org.netbeans.jemmy.operators.JPopupMenuOperator.callPopup(JPopupMenuOperator.java:337)
	at
org.netbeans.jemmy.operators.JPopupMenuOperator.callPopup(JPopupMenuOperator.java:350)
	at
org.netbeans.jellytools.TopComponentOperator.pushMenuOnTab(TopComponentOperator.java:460)
	at
org.netbeans.jellytools.actions.MaximizeWindowAction.performPopup(MaximizeWindowAction.java:72)
	at
org.netbeans.jellytools.actions.MaximizeWindowAction.performPopup(MaximizeWindowAction.java:60)
	at org.netbeans.jellytools.actions.Action.perform(Action.java:200)
	at org.netbeans.jellytools.actions.Action.perform(Action.java:251)
	at
org.netbeans.jellytools.TopComponentOperator.maximize(TopComponentOperator.java:205)
	at
gui.action.ExpandNodesProjectsView.initialize(ExpandNodesProjectsView.java:126)
	at testUtilities.PerformanceTestCase.measureTime(Unknown Source)
	at testUtilities.PerformanceTestCase.doMeasurement(Unknown Source)
	at
gui.action.ExpandNodesProjectsView.testExpandProjectNode(ExpandNodesProjectsView.java:78)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:495)
	at junit.framework.TestCase.runTest(TestCase.java:154)
	at junit.framework.TestCase.runBare(TestCase.java:127)
	at org.netbeans.jellytools.JellyTestCase.runBare(JellyTestCase.java:112)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at org.netbeans.junit.NbTestCase.run(NbTestCase.java:119)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at
org.netbeans.xtest.testrunner.JUnitTestRunner.runTests(JUnitTestRunner.java:173)
	at
org.netbeans.xtest.testrunner.JUnitTestRunner.runTests(JUnitTestRunner.java:129)
	at org.netbeans.xtest.plugin.ide.MainWithExec.run(MainWithExec.java:187)
	at org.netbeans.xtest.plugin.ide.Main$2.run(Main.java:320)
	at java.lang.Thread.run(Thread.java:595)


Comment 3 Marian Mirilovic 2004-06-25 15:40:09 UTC
Well,

I've looked at JellyTestCase calss and found root of all my troubles
with Jelly/Jemmy eating exceptions....

at line 137 ...
------------
            if (th instanceof JemmyException) {
                // all instancies of JemmyException are re-throwed as
AssertionError (test failed)
                throw new
AssertionFailedErrorException(th.getMessage(), th);

----------------

So, Do you nkow about any reasons why "all instancies of
JemmyException are re-throwed as AssertionError (test failed)" ?

I dont' think it's up to JellyTestCase do thinkgs like this, there is
no way for test developers (their used JellyTestCase) for recovery
testcase after TimeOutExpiredException !

...

Jirka,
do you plan to do something with this? If no, I'll start to use own
TestCase class ...., just let me know, it's high priority issue for
performance testing, because if I catch some problem on one test case,
I must have a way to recover IDE, now it isn't possible ...
Comment 4 Jiri Skrivanek 2004-06-30 15:24:39 UTC
Works for me. Exception is processed in JellyTestCase only if it is
not caught in test case.
Comment 5 Marian Mirilovic 2004-06-30 15:29:42 UTC
;(

Jirka is right, I am so sorry, once more I am so sorry .

Thanks a lot ..... ;)