RFR: 8338571: [TestBug] DefaultCloseOperation.java test not working as expected wrt instruction after JDK-8325851 fix
Alexey Ivanov
aivanov at openjdk.org
Wed Nov 20 18:33:23 UTC 2024
On Wed, 18 Sep 2024 13:23:32 GMT, Sharath TN <duke at openjdk.org> wrote:
> Fixed test and fix is working fine.
>
> Fix
> testUI(DefaultCloseOperation::createUI) will create PassfailJFrame test windows when test starts.
>
> PassFailJFrame.addTestWindow(testFrame);
> PassFailJFrame.addTestWindow(testDialog);
>
> Above code exists in the Test. So TestFrame and TestDailog windows will be created when testUI(DefaultCloseOperation::createUI) invoked.
>
> Need to remove above code as this code is not required.
Looks good.
> ```java
> PassFailJFrame.addTestWindow(testFrame);
> PassFailJFrame.addTestWindow(testDialog);
> ```
>
> Above code exists in the Test. So `TestFrame` and `TestDailog` windows will be created when `testUI(DefaultCloseOperation::createUI)` invoked.
The issue is not that they're created but that they're *shown*… now… before the tester clicks any buttons.
It confused me somewhat.
Removing these is fine and it returns the test to its previous state… nearly. `TestFrame` and `TestDailog` aren't disposed of when the test shuts down. It's not a big issue.
-------------
Marked as reviewed by aivanov (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/21061#pullrequestreview-2449400902
PR Comment: https://git.openjdk.org/jdk/pull/21061#issuecomment-2489277582
More information about the client-libs-dev
mailing list