Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8217965 | 13 | Steve Groeger | P4 | Resolved | Fixed | b06 |
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.
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.
- backported by
-
JDK-8217965 TEST_BUG: jdk/java/util/prefs/ExportSubtree.java passes even when test should fail
-
- Resolved
-