[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
This commit is contained in:
Joakim Erdfelt 2009-07-10 23:56:08 +00:00
parent d8006aaafd
commit b3c82d1bbf
2 changed files with 14 additions and 0 deletions

View File

@ -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()
{

View File

@ -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
{