提交 44e89f6e 编写于 作者: K khazra

7197662: (prefs) java/util/prefs/AddNodeChangeListener.java fails by timeout...

7197662: (prefs) java/util/prefs/AddNodeChangeListener.java fails by timeout or by "couldn't get file lock"
Summary: Set -Djava.util.prefs.userRoot to current working directory of user in the prefs tests
Reviewed-by: alanb, chegar, weijun, dxu
上级 c7e03e48
...@@ -24,9 +24,10 @@ ...@@ -24,9 +24,10 @@
*/ */
/* @test /* @test
* @bug 7160252 * @bug 7160252 7197662
* @summary Checks if events are delivered to a listener * @summary Checks if events are delivered to a listener
* when a child node is added or removed * when a child node is added or removed
* @run main/othervm -Djava.util.prefs.userRoot=. AddNodeChangeListener
*/ */
import java.util.prefs.*; import java.util.prefs.*;
......
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
# #
# @test # @test
# @bug 7198073 # @bug 7198073 7197662
# @build CheckUserPrefFirst CheckUserPrefLater # @build CheckUserPrefFirst CheckUserPrefLater
# @run shell CheckUserPrefsStorage.sh # @run shell CheckUserPrefsStorage.sh
# @summary Tests that user preferences are stored in the # @summary Tests that user preferences are stored in the
# permanent storage # permanent storage
# #
...@@ -50,14 +50,14 @@ case "$OS" in ...@@ -50,14 +50,14 @@ case "$OS" in
esac esac
# run CheckUserPrefFirst - creates and stores a user pref # run CheckUserPrefFirst - creates and stores a user pref
${TESTJAVA}${FS}bin${FS}java -cp ${TESTCLASSES} CheckUserPrefFirst ${TESTJAVA}${FS}bin${FS}java -cp ${TESTCLASSES} -Djava.util.prefs.userRoot=. CheckUserPrefFirst
result=$? result=$?
if [ "$result" -ne "0" ]; then if [ "$result" -ne "0" ]; then
exit 1 exit 1
fi fi
# run CheckUserPrefLater - Looks for the stored pref # run CheckUserPrefLater - Looks for the stored pref
${TESTJAVA}${FS}bin${FS}java -cp ${TESTCLASSES} CheckUserPrefLater ${TESTJAVA}${FS}bin${FS}java -cp ${TESTCLASSES} -Djava.util.prefs.userRoot=. CheckUserPrefLater
result=$? result=$?
if [ "$result" -ne "0" ]; then if [ "$result" -ne "0" ]; then
exit 1 exit 1
......
...@@ -23,8 +23,9 @@ ...@@ -23,8 +23,9 @@
/* /*
* @test * @test
* @bug 4619564 * @bug 4619564 7197662
* @summary XMl Comments in Preferences File lead to ClassCastException * @summary XMl Comments in Preferences File lead to ClassCastException
* @run main/othervm -Djava.util.prefs.userRoot=. CommentsInXml
* @author kladko * @author kladko
*/ */
......
...@@ -23,8 +23,9 @@ ...@@ -23,8 +23,9 @@
/* /*
* @test * @test
* @bug 4703132 * @bug 4703132 7197662
* @summary flush() throws an IllegalStateException on a removed node * @summary flush() throws an IllegalStateException on a removed node
* @run main/othervm -Djava.util.prefs.userRoot=. ConflictInFlush
* @author Sucheta Dambalkar * @author Sucheta Dambalkar
*/ */
......
...@@ -24,9 +24,10 @@ ...@@ -24,9 +24,10 @@
/* /*
* @test * @test
* @bug 4387136 4947349 * @bug 4387136 4947349 7197662
* @summary Due to a bug in XMLSupport.putPreferencesInXml(...), * @summary Due to a bug in XMLSupport.putPreferencesInXml(...),
* node's keys would not get exported. * node's keys would not get exported.
* @run main/othervm -Djava.util.prefs.userRoot=. ExportNode
* @author Konstantin Kladko * @author Konstantin Kladko
*/ */
import java.util.prefs.*; import java.util.prefs.*;
......
...@@ -23,9 +23,10 @@ ...@@ -23,9 +23,10 @@
/* @test /* @test
@bug 6203576 4700020 * @bug 6203576 4700020 7197662
@summary checks if the output of exportSubtree() is identical to * @summary checks if the output of exportSubtree() is identical to
the output from previous release. * the output from previous release.
* @run main/othervm -Djava.util.prefs.userRoot=. ExportSubtree
*/ */
import java.io.*; import java.io.*;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
# #
# @test # @test
# @bug 4991526 6514993 # @bug 4991526 6514993 7197662
# @summary Unit test for Preferences jar providers # @summary Unit test for Preferences jar providers
# #
# @build PrefsSpi # @build PrefsSpi
...@@ -89,12 +89,16 @@ case "`uname`" in Windows*|CYGWIN* ) CPS=';';; *) CPS=':';; esac ...@@ -89,12 +89,16 @@ case "`uname`" in Windows*|CYGWIN* ) CPS=';';; *) CPS=':';; esac
Sys "$java" "-cp" "$TESTCLASSES${CPS}extDir/PrefsSpi.jar" \ Sys "$java" "-cp" "$TESTCLASSES${CPS}extDir/PrefsSpi.jar" \
-Djava.util.prefs.PreferencesFactory=StubPreferencesFactory \ -Djava.util.prefs.PreferencesFactory=StubPreferencesFactory \
-Djava.util.prefs.userRoot=. \
PrefsSpi "StubPreferences" PrefsSpi "StubPreferences"
Sys "$java" "-cp" "$TESTCLASSES" \ Sys "$java" "-cp" "$TESTCLASSES" \
-Djava.util.prefs.userRoot=. \
PrefsSpi "java.util.prefs.*" PrefsSpi "java.util.prefs.*"
Sys "$java" "-cp" "$TESTCLASSES${CPS}extDir/PrefsSpi.jar" \ Sys "$java" "-cp" "$TESTCLASSES${CPS}extDir/PrefsSpi.jar" \
-Djava.util.prefs.userRoot=. \
PrefsSpi "StubPreferences" PrefsSpi "StubPreferences"
Sys "$java" "-cp" "$TESTCLASSES" "-Djava.ext.dirs=extDir" \ Sys "$java" "-cp" "$TESTCLASSES" "-Djava.ext.dirs=extDir" \
-Djava.util.prefs.userRoot=. \
PrefsSpi "StubPreferences" PrefsSpi "StubPreferences"
rm -rf jarDir extDir rm -rf jarDir extDir
...@@ -22,9 +22,10 @@ ...@@ -22,9 +22,10 @@
*/ */
/* @test /* @test
* @bug 7160242 7165118 * @bug 7160242 7165118 7197662
* @summary Check if NullPointerException is thrown if the key passed * @summary Check if NullPointerException is thrown if the key passed
* to remove() is null. * to remove() is null.
* @run main/othervm -Djava.util.prefs.userRoot=. RemoveNullKeyCheck
*/ */
import java.util.prefs.Preferences; import java.util.prefs.Preferences;
......
...@@ -23,10 +23,11 @@ ...@@ -23,10 +23,11 @@
/* @test /* @test
@bug 6178148 * @bug 6178148 7197662
@summary check if wrong exception gets thrown if one of the child * @summary check if wrong exception gets thrown if one of the child
nodes is readonly on underlying filesystem when node is * nodes is readonly on underlying filesystem when node is
being removed. * being removed.
* @run main/othervm -Djava.util.prefs.userRoot=. RemoveReadOnlyNode
*/ */
import java.io.*; import java.io.*;
......
...@@ -23,9 +23,10 @@ ...@@ -23,9 +23,10 @@
/* @test /* @test
* @bug 4705094 * @bug 4705094 7197662
* @summary Checks if correct exception gets thrown when removing an * @summary Checks if correct exception gets thrown when removing an
* unregistered NodeChangeListener . * unregistered NodeChangeListener .
* @run main/othervm -Djava.util.prefs.userRoot=. RemoveUnregedListener
*/ */
import java.util.prefs.*; import java.util.prefs.*;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册