-
Notifications
You must be signed in to change notification settings - Fork 9
CODETOOLS-7902793: Fix IllegalMonitorStateException in JInternalFrameOperatorCloseTest #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…OperatorCloseTest
@akolarkunnu @amresh-sahu, can you take a look? |
👋 Welcome back shurailine! A progress list of the required criteria for merging this PR into |
@shurymury This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been no new commits pushed to the ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
test/org/netbeans/jemmy/operators/JInternalFrameOperatorCloseTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not able to run the test due to NPE.
When close event is triggered by calling internalFrameOper.close(); JInternalFrame.doDefaultCloseAction() is called(). This method fires close property change event. Because we are closing the internal frame so this frame is removed from the desktop pane and when it is removed then its parent also set to null in Container.remove() method call.
I tested JInternalFrame add/remove workflow with Oracle's InternalFrameDemo class and It seems me valid. NPE is not a part of Product Bug.
java.lang.NullPointerException
at org.netbeans.jemmy.ClassReference.(ClassReference.java:51)
at org.netbeans.jemmy.EventDispatcher.(EventDispatcher.java:87)
at org.netbeans.jemmy.operators.ComponentOperator.(ComponentOperator.java:195)
at org.netbeans.jemmy.operators.ContainerOperator.(ContainerOperator.java:71)
at org.netbeans.jemmy.operators.WindowOperator.(WindowOperator.java:70)
at org.netbeans.jemmy.util.DefaultVisualizer.makeVisible(DefaultVisualizer.java:211)
at org.netbeans.jemmy.operators.ComponentOperator.makeComponentVisible(ComponentOperator.java:887)
at org.netbeans.jemmy.operators.AbstractButtonOperator.push(AbstractButtonOperator.java:350)
at org.netbeans.jemmy.drivers.windows.DefaultInternalFrameDriver.requestClose(DefaultInternalFrameDriver.java:59)
at org.netbeans.jemmy.operators.JInternalFrameOperator.close(JInternalFrameOperator.java:581)
at org.netbeans.jemmy.operators.JInternalFrameOperatorCloseTest.testClose(JInternalFrameOperatorCloseTest.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
Thank you, @amresh-sahu, for the analysis. Like we discussed, I can not reproduce this problem locally. But I think I have enough to work on this. |
…is closed in the teardown anyway
The exception was actually coming from the finally block where the test attempts to close an internal frame which acts absolutely normally (with field done been set to true). That, probably, means that there is something wrong in InternalFrameOperator.close(). Which is not related to this test, as this test is only supposed to test that waiting happens if the internal windows is not closing. |
@amresh-sahu , to make sure, can you run the test with the latest changes? |
As we have discovered with @amresh-sahu , it does not work in his environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look fine and these are working as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
/integrate |
@shurymury Pushed as commit 94612e2. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
What worked was to override setClosed(boolean) in JInternalFrame to not close the frame.
Also while inspecting the stack trace, I have discovered that the description is not passed down from JInternalFrameOperator.waitClosed()
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jemmy-v2 pull/4/head:pull/4
$ git checkout pull/4