RFR: 8348423: [TestBug] stress test Nodes initialization from a background thread
Andy Goryachev
angorya at openjdk.org
Fri Jan 31 20:10:04 UTC 2025
On Fri, 31 Jan 2025 19:16:44 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> Created a test that validates various Nodes can be initialized in a background thread.
>
> tests/system/src/test/java/test/robot/javafx/scene/NodeInitializationBackgroundThreadTest.java line 305:
>
>> 303: return c;
>> 304: }, (c) -> {
>> 305: c.show(); // fails here
>
> As mentioned in the JBS issue, I think we should consider filing an issue to update the spec of `ComboBoxPopupControl::show` to require calling it on the JavaFX app thread (throwing an exception if called off thread). Either way, we should ensure that the skins themselves never call show unless the control is showing.
yes, we'll deal with later.
I think there might be a solution which allows show() of an unconnected popup, and if that we'll use the ticket to add a javadoc comment and modify the test.
> tests/system/src/test/java/test/robot/javafx/scene/NodeInitializationBackgroundThreadTest.java line 755:
>
>> 753: inFx(() -> {
>> 754: operation.accept(visibleNode);
>> 755: });
>
> Does this need to be done for each thread? I can see why it might make sense to do that, as it preserves the relative frequency of operations on the FX app thread versus the frequency off thread regardless of how many threads you have. It would risk flooding the FX event queue if the number of background threads were huge, but you limit it based on the number of physical HW threads, so this seems OK.
yes, jiggling the visible node during the test adds stress to the system, which is the intended behavior.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1690#discussion_r1937930105
PR Review Comment: https://git.openjdk.org/jfx/pull/1690#discussion_r1937923749
More information about the openjfx-dev
mailing list