RFR: 8255337: [TestBug] Controls unit tests - ButtonTest and ComboBoxTest - log ClassCastException [v2]

Ajit Ghaisas aghaisas at openjdk.java.net
Tue Oct 27 12:00:31 UTC 2020


On Tue, 27 Oct 2020 10:31:48 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:

>> stage.show() has the same effect of fixing the bug. In fact, I fixed it initially with exact this fix.
>> 
>> When I looked at the other tests in ComboBoxTest class, I saw that there is a pattern of creating a Stage, creating a Scene with ComboBox and then adding Scene to the Stage. What was missed was stage.show(). The StageLoader does exactly these steps (including the missed stage.show()).
>> StageLoader might be a misfit at some of the other places in our tests (I believe that is the reason for your dislike), but I feel using StageLoader is a better fit in ComboBoxTest.
>
> thanks! 
> 
> Wondering as to when/why Stageloader might be a misfit? I completely gave up on using it a while ago, so don't really remember *cough

It is not that StageLoader is bad as such. By misfit - I meant - error prone to be used in tests that already use their own Scene and Stage creation.

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

PR: https://git.openjdk.java.net/jfx/pull/337


More information about the openjfx-dev mailing list