RFR: 8266643: Intermittent failure of HonorDeveloperSettingsTest unit test
    Kevin Rushforth 
    kcr at openjdk.java.net
       
    Mon May 17 12:50:58 UTC 2021
    
    
  
On Wed, 12 May 2021 11:53:16 GMT, Ambarish Rapte <arapte at openjdk.org> wrote:
> The test fails intermittently on github build. But I do not observe this issue locally on my Ubuntu20.04 VM.
> I am suspecting that the reason of failure is that the test are not cleaned up correctly. The changes in this PR cleans up the test, by removing all children added to root and hiding the stage.
modules/javafx.graphics/src/test/java/test/javafx/css/HonorDeveloperSettingsTest.java line 61:
> 59:     private Text text;
> 60:     Stage stage;
> 61:     Group root;
Can these be private?
modules/javafx.graphics/src/test/java/test/javafx/css/HonorDeveloperSettingsTest.java line 76:
> 74:         resetStyleManager();
> 75:         root.getChildren().clear();
> 76:         stage.hide();
I recommend protecting these with null checks. You might also set `stage` and `root` to null after clearing / hiding (but since they are instance variables that doesn't really matter).
-------------
PR: https://git.openjdk.java.net/jfx/pull/496
    
    
More information about the openjfx-dev
mailing list