8085904: Test timeout on Mac
authorweijun
Fri, 09 Oct 2015 09:33:54 +0800
changeset 32932 9250ad475b43
parent 32931 2ba4f06f8684
child 32933 83d50f1247bb
8085904: Test timeout on Mac Reviewed-by: wetmore
jdk/test/java/security/PermissionCollection/AddToReadOnlyPermissionCollection.java
jdk/test/java/security/PermissionCollection/Concurrent.java
jdk/test/java/security/PermissionCollection/PermissionCollectionStreamTest.java
jdk/test/sun/security/provider/PolicyFile/CombinedPerms.java
jdk/test/sun/security/provider/PolicyFile/CombinedPerms.policy
--- a/jdk/test/java/security/PermissionCollection/AddToReadOnlyPermissionCollection.java	Thu Oct 08 20:51:08 2015 +0000
+++ b/jdk/test/java/security/PermissionCollection/AddToReadOnlyPermissionCollection.java	Fri Oct 09 09:33:54 2015 +0800
@@ -107,11 +107,11 @@
 
     static void tryFilePC() throws Exception {
         try {
-            FilePermission p0 = new FilePermission("/home/foobar","read");
+            FilePermission p0 = new FilePermission("/tmp/foobar","read");
             PermissionCollection pc = p0.newPermissionCollection();
             pc.setReadOnly();   // this should lock out future adds
             //
-            FilePermission p1 = new FilePermission("/home/quux","read");
+            FilePermission p1 = new FilePermission("/tmp/quux","read");
             pc.add(p1);
             throw new
                 Exception("Failed...FilePermission added to readonly FilePermissionCollection.");
--- a/jdk/test/java/security/PermissionCollection/Concurrent.java	Thu Oct 08 20:51:08 2015 +0000
+++ b/jdk/test/java/security/PermissionCollection/Concurrent.java	Fri Oct 09 09:33:54 2015 +0800
@@ -166,9 +166,9 @@
         new AllPermission(), new AllPermission()};
 
     private static final Permission[] filep = new Permission[]{
-        new FilePermission("/home/foobar", "read"),
-        new FilePermission("/home/foo", "write"),
-        new FilePermission("/home/foobar", "read,write"),
+        new FilePermission("/tmp/foobar", "read"),
+        new FilePermission("/tmp/foo", "write"),
+        new FilePermission("/tmp/foobar", "read,write"),
             };
 
     private static final Permission[] sockp = new Permission[]{
--- a/jdk/test/java/security/PermissionCollection/PermissionCollectionStreamTest.java	Thu Oct 08 20:51:08 2015 +0000
+++ b/jdk/test/java/security/PermissionCollection/PermissionCollectionStreamTest.java	Fri Oct 09 09:33:54 2015 +0800
@@ -50,9 +50,9 @@
                 {
                         "FilePermission",
                         new Permission[]{
-                                new FilePermission("/home/foobar", "read"),
-                                new FilePermission("/home/foo", "write"),
-                                new FilePermission("/home/foobar", "read,write"),
+                                new FilePermission("/tmp/foobar", "read"),
+                                new FilePermission("/tmp/foo", "write"),
+                                new FilePermission("/tmp/foobar", "read,write"),
                         }
                 },
         };
--- a/jdk/test/sun/security/provider/PolicyFile/CombinedPerms.java	Thu Oct 08 20:51:08 2015 +0000
+++ b/jdk/test/sun/security/provider/PolicyFile/CombinedPerms.java	Fri Oct 09 09:33:54 2015 +0800
@@ -39,7 +39,7 @@
 
         String host = "localhost";
 
-        URL u = new URL("file:/home/duke");
+        URL u = new URL("file:/tmp/duke");
         CodeSource cs =
             new CodeSource(u, (java.security.cert.Certificate[]) null);
         Permissions p = new Permissions();
--- a/jdk/test/sun/security/provider/PolicyFile/CombinedPerms.policy	Thu Oct 08 20:51:08 2015 +0000
+++ b/jdk/test/sun/security/provider/PolicyFile/CombinedPerms.policy	Fri Oct 09 09:33:54 2015 +0800
@@ -1,3 +1,3 @@
-grant codebase "file:/home/duke" {
+grant codebase "file:/tmp/duke" {
     permission java.net.SocketPermission "localhost", "accept";
 };