7197662: (prefs) java/util/prefs/AddNodeChangeListener.java fails by timeout or by "couldn't get file lock"

Set -Djava.util.prefs.userRoot to current working directory of user in the prefs tests

Reviewed-by: alanb, chegar, weijun, dxu
This commit is contained in:
Kurchi Subhra Hazra 2012-11-30 12:00:07 -08:00
parent 5b7045b5ba
commit d7cae9afff
10 changed files with 30 additions and 18 deletions

@ -24,9 +24,10 @@
*/
/* @test
* @bug 7160252
* @bug 7160252 7197662
* @summary Checks if events are delivered to a listener
* when a child node is added or removed
* @run main/othervm -Djava.util.prefs.userRoot=. AddNodeChangeListener
*/
import java.util.prefs.*;

@ -22,10 +22,10 @@
#
# @test
# @bug 7198073
# @bug 7198073 7197662
# @build CheckUserPrefFirst CheckUserPrefLater
# @run shell CheckUserPrefsStorage.sh
# @summary Tests that user preferences are stored in the
# @summary Tests that user preferences are stored in the
# permanent storage
#
@ -50,14 +50,14 @@ case "$OS" in
esac
# 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=$?
if [ "$result" -ne "0" ]; then
exit 1
fi
# 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=$?
if [ "$result" -ne "0" ]; then
exit 1

@ -23,8 +23,9 @@
/*
* @test
* @bug 4619564
* @bug 4619564 7197662
* @summary XMl Comments in Preferences File lead to ClassCastException
* @run main/othervm -Djava.util.prefs.userRoot=. CommentsInXml
* @author kladko
*/

@ -23,8 +23,9 @@
/*
* @test
* @bug 4703132
* @bug 4703132 7197662
* @summary flush() throws an IllegalStateException on a removed node
* @run main/othervm -Djava.util.prefs.userRoot=. ConflictInFlush
* @author Sucheta Dambalkar
*/

@ -24,9 +24,10 @@
/*
* @test
* @bug 4387136 4947349
* @bug 4387136 4947349 7197662
* @summary Due to a bug in XMLSupport.putPreferencesInXml(...),
* node's keys would not get exported.
* @run main/othervm -Djava.util.prefs.userRoot=. ExportNode
* @author Konstantin Kladko
*/
import java.util.prefs.*;

@ -23,9 +23,10 @@
/* @test
@bug 6203576 4700020
@summary checks if the output of exportSubtree() is identical to
the output from previous release.
* @bug 6203576 4700020 7197662
* @summary checks if the output of exportSubtree() is identical to
* the output from previous release.
* @run main/othervm -Djava.util.prefs.userRoot=. ExportSubtree
*/
import java.io.*;

@ -24,7 +24,7 @@
#
# @test
# @bug 4991526 6514993
# @bug 4991526 6514993 7197662
# @summary Unit test for Preferences jar providers
#
# @build PrefsSpi
@ -89,12 +89,16 @@ case "`uname`" in Windows*|CYGWIN* ) CPS=';';; *) CPS=':';; esac
Sys "$java" "-cp" "$TESTCLASSES${CPS}extDir/PrefsSpi.jar" \
-Djava.util.prefs.PreferencesFactory=StubPreferencesFactory \
-Djava.util.prefs.userRoot=. \
PrefsSpi "StubPreferences"
Sys "$java" "-cp" "$TESTCLASSES" \
-Djava.util.prefs.userRoot=. \
PrefsSpi "java.util.prefs.*"
Sys "$java" "-cp" "$TESTCLASSES${CPS}extDir/PrefsSpi.jar" \
-Djava.util.prefs.userRoot=. \
PrefsSpi "StubPreferences"
Sys "$java" "-cp" "$TESTCLASSES" "-Djava.ext.dirs=extDir" \
-Djava.util.prefs.userRoot=. \
PrefsSpi "StubPreferences"
rm -rf jarDir extDir

@ -22,9 +22,10 @@
*/
/* @test
* @bug 7160242 7165118
* @bug 7160242 7165118 7197662
* @summary Check if NullPointerException is thrown if the key passed
* to remove() is null.
* @run main/othervm -Djava.util.prefs.userRoot=. RemoveNullKeyCheck
*/
import java.util.prefs.Preferences;

@ -23,10 +23,11 @@
/* @test
@bug 6178148
@summary check if wrong exception gets thrown if one of the child
nodes is readonly on underlying filesystem when node is
being removed.
* @bug 6178148 7197662
* @summary check if wrong exception gets thrown if one of the child
* nodes is readonly on underlying filesystem when node is
* being removed.
* @run main/othervm -Djava.util.prefs.userRoot=. RemoveReadOnlyNode
*/
import java.io.*;

@ -23,9 +23,10 @@
/* @test
* @bug 4705094
* @bug 4705094 7197662
* @summary Checks if correct exception gets thrown when removing an
* unregistered NodeChangeListener .
* @run main/othervm -Djava.util.prefs.userRoot=. RemoveUnregedListener
*/
import java.util.prefs.*;