Author: rob.stryker(a)jboss.com
Date: 2009-04-27 02:44:54 -0400 (Mon, 27 Apr 2009)
New Revision: 14929
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/AbstractDeploymentTest.java
Log:
JBIDE-4237 - unit test didn't set temporary deploy location
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/AbstractDeploymentTest.java
===================================================================
---
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/AbstractDeploymentTest.java 2009-04-27
04:24:58 UTC (rev 14928)
+++
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/AbstractDeploymentTest.java 2009-04-27
06:44:54 UTC (rev 14929)
@@ -41,12 +41,19 @@
protected IRuntime runtime;
protected IServer server;
protected String deployLocation;
+ protected String tempDeployLocation;
public AbstractDeploymentTest(String[] projectNames, String[] testProperties) {
try {
this.sourceProjectName = projectNames;
this.testProperties = testProperties;
- this.deployLocation = getFileLocation("/testOutputs").getAbsolutePath();
+ File f = getFileLocation("/testOutputs");
+ File fDeploy = new File(f, "1");
+ File fTmpDeploy = new File(f, "2");
+ fDeploy.mkdir();
+ fTmpDeploy.mkdir();
+ deployLocation = fDeploy.getAbsolutePath();
+ tempDeployLocation = fDeploy.getAbsolutePath();
this.provider = new TestProjectProvider[sourceProjectName.length];
this.workspaceProject = new IProject[sourceProjectName.length];
} catch( CoreException ce ) {
@@ -157,7 +164,9 @@
ServerWorkingCopy swc = (ServerWorkingCopy) st.createServer("testServer",
null, null);
swc.setServerConfiguration(null);
swc.setName("testServer");
+ swc.setRuntime(runtime);
swc.setAttribute(DeployableServer.DEPLOY_DIRECTORY, deployLocation);
+ swc.setAttribute(DeployableServer.TEMP_DEPLOY_DIRECTORY, tempDeployLocation);
server = swc.save(true, null);
}