You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2016/04/14 16:16:52 UTC

svn commit: r1739114 - in /tomcat/tc8.5.x/trunk: ./ test/org/apache/catalina/webresources/TestFileResourceSetReadOnly.java

Author: markt
Date: Thu Apr 14 14:16:52 2016
New Revision: 1739114

URL: http://svn.apache.org/viewvc?rev=1739114&view=rev
Log:
This test appears to be conflicting with another test but I can't see how. Give it a dedicated temp location to work in to (hopefully) avoid the conflict.

Modified:
    tomcat/tc8.5.x/trunk/   (props changed)
    tomcat/tc8.5.x/trunk/test/org/apache/catalina/webresources/TestFileResourceSetReadOnly.java

Propchange: tomcat/tc8.5.x/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Apr 14 14:16:52 2016
@@ -1 +1 @@
-/tomcat/trunk:1734785,1734799,1734845,1734928,1735041,1735044,1735480,1735577,1735597,1735599-1735600,1735615,1736145,1736162,1736209,1736280,1736297,1736299,1736489,1736646,1736703,1736836,1736849,1737104-1737105,1737112,1737117,1737119-1737120,1737155,1737157,1737192,1737280,1737339,1737632,1737664,1737715,1737748,1737785,1737834,1737860,1737959,1738005,1738007,1738014-1738015,1738018,1738022,1738039,1738043,1738059-1738060,1738147,1738149,1738174-1738175,1738261,1738589,1738623-1738625,1738643,1738816,1738850,1738855,1738946-1738948,1738953-1738954,1738979,1738982,1739079-1739081,1739087
+/tomcat/trunk:1734785,1734799,1734845,1734928,1735041,1735044,1735480,1735577,1735597,1735599-1735600,1735615,1736145,1736162,1736209,1736280,1736297,1736299,1736489,1736646,1736703,1736836,1736849,1737104-1737105,1737112,1737117,1737119-1737120,1737155,1737157,1737192,1737280,1737339,1737632,1737664,1737715,1737748,1737785,1737834,1737860,1737959,1738005,1738007,1738014-1738015,1738018,1738022,1738039,1738043,1738059-1738060,1738147,1738149,1738174-1738175,1738261,1738589,1738623-1738625,1738643,1738816,1738850,1738855,1738946-1738948,1738953-1738954,1738979,1738982,1739079-1739081,1739087,1739113

Modified: tomcat/tc8.5.x/trunk/test/org/apache/catalina/webresources/TestFileResourceSetReadOnly.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/test/org/apache/catalina/webresources/TestFileResourceSetReadOnly.java?rev=1739114&r1=1739113&r2=1739114&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/test/org/apache/catalina/webresources/TestFileResourceSetReadOnly.java (original)
+++ tomcat/tc8.5.x/trunk/test/org/apache/catalina/webresources/TestFileResourceSetReadOnly.java Thu Apr 14 14:16:52 2016
@@ -16,9 +16,35 @@
  */
 package org.apache.catalina.webresources;
 
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.attribute.FileAttribute;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+import org.apache.catalina.startup.ExpandWar;
+import org.apache.catalina.startup.TomcatBaseTest;
+
 public class TestFileResourceSetReadOnly extends AbstractTestFileResourceSet {
 
-    private static final String dir1 = "test/webresources/dir1";
+    private static Path tempDir;
+    private static File dir1;
+
+    @BeforeClass
+    public static void before() throws IOException {
+        tempDir = Files.createTempDirectory("test", new FileAttribute[0]);
+        dir1 = new File(tempDir.toFile(), "dir1");
+        TomcatBaseTest.recursiveCopy(new File("test/webresources/dir1").toPath(), dir1.toPath());
+    }
+
+    @AfterClass
+    public static void after() {
+        ExpandWar.delete(tempDir.toFile());
+    }
+
 
     public TestFileResourceSetReadOnly() {
         super(true);
@@ -26,6 +52,6 @@ public class TestFileResourceSetReadOnly
 
     @Override
     protected String getDir1() {
-        return dir1;
+        return dir1.getAbsolutePath();
     }
 }
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org