On Tue, 6 Jul 2021 20:00:16 GMT, Ambarish Rapte <ara...@openjdk.org> wrote:

>> Jeanette Winzenburg has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   addressed review issues
>
> modules/javafx.controls/src/test/java/test/com/sun/javafx/scene/control/behavior/BehaviorCleanupTest.java
>  line 404:
> 
>> 402:         }
>> 403:         if (!root.getChildren().contains(control)) {
>> 404:             root.getChildren().add(control);
> 
> The controls added to root are not removed. I think we should clear the 
> scenegraph after execution of each test.
> suggesting to add following call in the cleanup method,
> 
> if (root != null) {
>     root.getChildren().removeAll();
> }

Hmm ... don't quite understand: the cleanup follows the same pattern used 
across many controls/skin tests 

    @After
    public void cleanup() {
        if (stage != null) {
            stage.hide();
        }

The stage is created at most once per test method, and allows to add more 
controls in that same test method, it's hidden after running each test. Running 
the next text, there's no reference to the old .. why should we remove its 
children also? Or maybe I misunderstand what you are suggesting :)

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

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

Reply via email to