<Swing Dev> RFR: 8261689: javax/swing/JComponent/7154030/bug7154030.java still fails with "Exception: Failed to hide opaque button"

Alexander Zuev kizune at openjdk.java.net
Tue Mar 2 21:46:41 UTC 2021


On Tue, 2 Mar 2021 13:28:44 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> 8261689: javax/swing/JComponent/7154030/bug7154030.java still fails with "Exception: Failed to hide opaque button"
>
> test/jdk/javax/swing/JComponent/7154030/bug7154030.java line 93:
> 
>> 91:                     frame.setMinimumSize(new Dimension(350, 350));
>> 92:                     frame.setMaximumSize(new Dimension(350, 350));
>> 93:                     frame.pack();
> 
> Wouldn't it make {{desktop}} larger than 300,300?

It will but it forces the invalidation and repainting of the content so test does not fail.

> test/jdk/javax/swing/JComponent/7154030/bug7154030.java line 133:
> 
>> 131:                 ImageIO.write(imageShow, "png", new File("imageShow.png"));
>> 132:                 ImageIO.write(fullScreen, "png", new File("fullScreenInit.png"));
>> 133:                 throw new Exception("Failed to show opaque button");
> 
> <del>I suggest moving saving the images into a new method.</del>
> 
> I see the set of images is different each time. Probably it makes sense to save all the images which are non-null, what do you think?

I don't think it is necessary. And since this is an existing test i'm trying not to change its overall behavior and having screenshots at other stages of the testing is not beneficial in the test debugging.

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

PR: https://git.openjdk.java.net/jdk/pull/2790


More information about the swing-dev mailing list