Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8305779

javax/swing/JRootPane/DefaultButtonTest.java: Default Button not pressed for L&F: javax.swing.plaf.nimbus.NimbusLookAndFeel

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 21
    • 20, 21
    • client-libs
    • None

      The test javax/swing/JRootPane/DefaultButtonTest.java intermittently fails on Ubuntu 20.04 22.04 with the following diagnostic:

      ====================8<--------------------
      #section:main
      ----------messages:(7/275)----------
      command: main DefaultButtonTest
      reason: User specified action: run main DefaultButtonTest
      started: Sun Apr 09 01:55:32 CEST 2023
      Mode: othervm
      Additional options from @modules: --add-modules java.desktop
      finished: Sun Apr 09 01:55:32 CEST 2023
      elapsed time (seconds): 0.759
      ----------configuration:(3/40)----------
      Boot Layer
        add modules: java.desktop

      ----------System.out:(3/169)----------
      Testing L&F: javax.swing.plaf.metal.MetalLookAndFeel
      Test Passed for L&F: javax.swing.plaf.metal.MetalLookAndFeel
      Testing L&F: javax.swing.plaf.nimbus.NimbusLookAndFeel
      ----------System.err:(12/892)----------
      java.lang.RuntimeException: Test Failed, Default Button not pressed for L&F: javax.swing.plaf.nimbus.NimbusLookAndFeel
      at DefaultButtonTest.runTest(DefaultButtonTest.java:110)
      at DefaultButtonTest.main(DefaultButtonTest.java:47)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
      at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
      at java.base/java.lang.Thread.run(Thread.java:1630)

      JavaTest Message: Test threw exception: java.lang.RuntimeException: Test Failed, Default Button not pressed for L&F: javax.swing.plaf.nimbus.NimbusLookAndFeel
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Test Failed, Default Button not pressed for L&F: javax.swing.plaf.nimbus.NimbusLookAndFeel
      ====================8<--------------------

      The issue was observed with 21-ea+17-1421

      As for 20+36-2344 the test fails for javax.swing.plaf.metal.MetalLookAndFeel

      ====================8<--------------------
      ----------System.out:(1/53)----------
      Testing L&F: javax.swing.plaf.metal.MetalLookAndFeel
      ----------System.err:(12/886)----------
      java.lang.RuntimeException: Test Failed, Default Button not pressed for L&F: javax.swing.plaf.metal.MetalLookAndFeel
      at DefaultButtonTest.runTest(DefaultButtonTest.java:110)
      at DefaultButtonTest.main(DefaultButtonTest.java:47)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
      at java.base/java.lang.Thread.run(Thread.java:1623)

      JavaTest Message: Test threw exception: java.lang.RuntimeException: Test Failed, Default Button not pressed for L&F: javax.swing.plaf.metal.MetalLookAndFeel
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Test Failed, Default Button not pressed for L&F: javax.swing.plaf.metal.MetalLookAndFeel
      ====================8<--------------------

      Reproducibility: ~70%

      Steps to reproduce:

      $ runme.sh jtreg [test_jdk] "" test/jdk/javax/swing/JRootPane/DefaultButtonTest.java

      see the attached runme.sh

      Please note: the issue is also reproducible on Windows 10, Windows 11

            psadhukhan Prasanta Sadhukhan
            vprovodin Vitaly Provodin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: