Author: markt Date: Wed Aug 21 08:47:25 2013 New Revision: 1516113 URL: http://svn.apache.org/r1516113 Log: Fix Gump failure as java.io.tmpdir directory isn't writable.
Modified: tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java Modified: tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java?rev=1516113&r1=1516112&r2=1516113&view=diff ============================================================================== --- tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java (original) +++ tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java Wed Aug 21 08:47:25 2013 @@ -85,8 +85,13 @@ public class TestCoyoteAdapter extends T // Setup Tomcat instance Tomcat tomcat = getTomcatInstance(); - // Must have a real docBase - just use temp - File docBase = new File(System.getProperty("java.io.tmpdir")); + // Must have a real docBase. Don't use java.io.tmpdir as it may not be + // writable. + File docBase = new File(getTemporaryDirectory(), "testCoyoteAdapter"); + addDeleteOnTearDown(docBase); + if (!docBase.mkdirs() && !docBase.isDirectory()) { + Assert.fail("Failed to create: [" + docBase.toString() + "]"); + } // Create the folder that will trigger the redirect File foo = new File(docBase, "foo"); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org