Removed an unused 'address' parameter to the RunAtCloudServer and now also stopping the server after integration tests

This commit is contained in:
Andrew Phillips 2012-04-11 01:36:06 -04:00
parent d1fc23301d
commit cac8b9136b
2 changed files with 10 additions and 4 deletions

View File

@ -38,9 +38,9 @@ import org.apache.commons.cli.ParseException;
public class RunAtCloudServer {
protected StaxSdkAppServer2 server;
public void writePropertiesAndStartServer(final String address, final String port,
final String warfile, final String environments,
final String serverBaseDirectory, Properties props) throws IOException, InterruptedException, ParseException, ServletException {
public void writePropertiesAndStartServer(final String port, final String warfile,
final String environments, final String serverBaseDirectory,
Properties props) throws IOException, InterruptedException, ParseException, ServletException {
String filename = String.format(
"%1$s/WEB-INF/jclouds.properties", warfile);
System.err.println("file: " + filename);

View File

@ -44,6 +44,7 @@ import org.jclouds.demo.tweetstore.controller.StoreTweetsController;
import org.jclouds.logging.log4j.config.Log4JLoggingModule;
import org.jclouds.rest.AuthorizationException;
import org.jclouds.util.Strings2;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@ -176,7 +177,7 @@ public class TweetStoreLiveTest {
url = new URL(String.format("http://%s:%s", address, port));
server = new RunAtCloudServer();
server.writePropertiesAndStartServer(address, port, warfile, "itest",
server.writePropertiesAndStartServer(port, warfile, "itest",
serverBaseDirectory, props);
}
@ -229,4 +230,9 @@ public class TweetStoreLiveTest {
String string = Strings2.toStringAndClose(i);
assert string.indexOf("Tweets in Clouds") >= 0 : string;
}
@AfterTest
public void stopDevAppServer() throws Exception {
server.stop();
}
}