From b3c82d1bbfc569894a9d361505563ac9177dc28a Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Fri, 10 Jul 2009 23:56:08 +0000 Subject: [PATCH] [BUG 283172] fix build on windows * Using /target/work/${testname}/ as temp dir for webapp deployment (so as to play nice in windows, and not fill up the ${java.io.tmpdir} with webapp deployments) git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@548 7e9141cc-0065-0410-87d8-b60c137991c4 --- .../java/org/eclipse/jetty/test/AbstractJettyTestCase.java | 7 +++++++ .../java/org/eclipse/jetty/test/rfcs/RFC2616BaseTest.java | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/tests/test-integration/src/test/java/org/eclipse/jetty/test/AbstractJettyTestCase.java b/tests/test-integration/src/test/java/org/eclipse/jetty/test/AbstractJettyTestCase.java index aaafdd4e6e4..b6246ce9125 100644 --- a/tests/test-integration/src/test/java/org/eclipse/jetty/test/AbstractJettyTestCase.java +++ b/tests/test-integration/src/test/java/org/eclipse/jetty/test/AbstractJettyTestCase.java @@ -43,6 +43,13 @@ public abstract class AbstractJettyTestCase extends TestCase return baseDir; } + + public File getTargetDir() + { + File path = new File(getBaseDir(),"target"); + assertDirExists("target dir",path); + return path; + } public File getTestResourcesDir() { diff --git a/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616BaseTest.java b/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616BaseTest.java index aa3dc3b2ade..a1052275f67 100644 --- a/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616BaseTest.java +++ b/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616BaseTest.java @@ -19,6 +19,7 @@ package org.eclipse.jetty.test.rfcs; import static org.junit.Assert.assertThat; import static org.junit.matchers.JUnitMatchers.containsString; +import java.io.File; import java.io.IOException; import java.net.Socket; import java.text.SimpleDateFormat; @@ -76,17 +77,23 @@ public abstract class RFC2616BaseTest extends AbstractJettyTestCase } } + @Override @Before public void setUp() throws Exception { super.setUp(); + File testWorkDir = new File(getTargetDir(), "work" + File.pathSeparator + getName()); + + System.setProperty("java.io.tmpdir",testWorkDir.getAbsolutePath()); + server = getJettyServer(); server.load(); server.start(); http = new HttpTesting(getHttpClientSocket(),server.getServerPort()); } + @Override @After public void tearDown() throws Exception {