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

TEST_BUG: jdk/java/util/prefs/ExportSubtree.java passes even when test should fail

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 13
    • 11.0.1
    • core-libs
    • None
    • b06
    • Verified

        When running the test jdk/java/util/prefs/ExportSubtree.java using jtreg the test passes even though the exported XML doesnt match the expected XML.

        The results shown in the .jtr file is:

        ----------System.out:(0/0)----------
        ----------System.err:(13/869)----------
        Jan 25, 2019 9:51:53 AM java.util.prefs.FileSystemPreferences$1 run
        INFO: Created user preferences directory.
        Jan 25, 2019 9:51:53 AM java.util.prefs.FileSystemPreferences$6 run
        WARNING: Prefs file removed in background ./.java/.userPrefs/prefs.xml
        java.io.IOException: exportSubtree does not output expected result
                at ExportSubtree.main(ExportSubtree.java:48)
                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:567)
                at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
                at java.base/java.lang.Thread.run(Thread.java:835)
        STATUS:Passed.

        It seems that in the test there are 2 issues:

        1) The test checkes the actual vs. expected results and throws an exception but this is caught later in the code and prints a stackTrace - so test passes.
        2) The exported XML will never match the expected as we now export 'standalone="no" in the XML prologue, which isn't in the expected XML.

              sgroeger Steve Groeger (Inactive)
              sgroeger Steve Groeger (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: