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

Test jdk/javax/swing/UIDefaults/8146330/UIDefaultKeySizeTest.java is failing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 15
    • Fix Version/s: 15
    • Component/s: client-libs
    • Labels:

      Description

      The new test jdk/javax/swing/UIDefaults/8146330/UIDefaultKeySizeTest.java is failing in nightly headless testing on Solaris and Linux as follows :-
      javax.swing.UnsupportedLookAndFeelException: [GTK look and feel - com.sun.java.swing.plaf.gtk.GTKLookAndFeel] not supported on this platform
      at java.desktop/javax.swing.UIManager.setLookAndFeel(UIManager.java:574)
      at java.desktop/javax.swing.UIManager.setLookAndFeel(UIManager.java:633)
      at UIDefaultKeySizeTest.main(UIDefaultKeySizeTest.java:47)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
      at java.base/java.lang.Thread.run(Thread.java:832)

      JavaTest Message: Test threw exception: javax.swing.UnsupportedLookAndFeelException: [GTK look and feel - com.sun.java.swing.plaf.gtk.GTKLookAndFeel] not supported on this platform
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: javax.swing.UnsupportedLookAndFeelException: [GTK look and feel - com.sun.java.swing.plaf.gtk.GTKLookAndFeel] not supported on this platform

      It seems that some of these headless test systems are not set up with GTK libraries installed.

      Since they are for headless usage only, that seems likely.
      This test either needs to be marked headful, or needs to handle the exception.

      However I am intrigued that the test does this :-
      + UIManager.LookAndFeelInfo[] installedLookAndFeels;
      + installedLookAndFeels = UIManager.getInstalledLookAndFeels();
      +
      + for (UIManager.LookAndFeelInfo LF : installedLookAndFeels) {
      + UIManager.setLookAndFeel(LF.getClassName());

       I'd have expected UIManager.getInstalledLookAndFeels() would not return the GTK L&F in such a case, so we should also look at the product behaviour and why it does not check for the libraries first. Performance or something else ?
      Until we have evaluated that do not add "testbug" or similar label.

      I think we also need to problem list this test ASAP.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              trebari Tejpal Rebari (Inactive)
              Reporter:
              prr Philip Race
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: