mirror of https://github.com/apache/jclouds.git
adjusted test glitches
This commit is contained in:
parent
4539174a7f
commit
0d93857601
|
@ -32,7 +32,6 @@ import java.util.Set;
|
|||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
import org.easymock.IArgumentMatcher;
|
||||
import org.jclouds.compute.domain.ExecResponse;
|
||||
|
@ -370,7 +369,7 @@ public class StubComputeServiceIntegrationTest extends
|
|||
client.connect();
|
||||
|
||||
expect(client.exec("echo hello")).andReturn(new ExecResponse("hello", "", 0));
|
||||
expect(client.exec("java -version")).andReturn(new ExecResponse("", "1.7", 0));
|
||||
expect(client.exec("java -version")).andReturn(new ExecResponse("", "OpenJDK", 0));
|
||||
|
||||
client.disconnect();
|
||||
}
|
||||
|
@ -530,9 +529,4 @@ public class StubComputeServiceIntegrationTest extends
|
|||
super.testDestroyNodes();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void cleanup() throws InterruptedException, ExecutionException, TimeoutException {
|
||||
super.cleanup();
|
||||
}
|
||||
|
||||
}
|
|
@ -98,7 +98,7 @@ import org.jclouds.scriptbuilder.statements.login.AdminAccess;
|
|||
import org.jclouds.ssh.SshClient;
|
||||
import org.jclouds.ssh.SshException;
|
||||
import org.jclouds.util.Strings2;
|
||||
import org.testng.annotations.AfterTest;
|
||||
import org.testng.annotations.AfterClass;
|
||||
import org.testng.annotations.BeforeGroups;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
|
@ -878,7 +878,7 @@ public abstract class BaseComputeServiceLiveTest<S, A, C extends ComputeServiceC
|
|||
ExecResponse hello = ssh.exec("echo hello");
|
||||
assertEquals(hello.getOutput().trim(), "hello");
|
||||
ExecResponse exec = ssh.exec("java -version");
|
||||
assert exec.getError().indexOf("OpenJDK") != -1 || exec.getOutput().indexOf("OpenJDK") != -1 : exec
|
||||
assert exec.getError().indexOf("OpenJDK") != -1 || exec.getOutput().indexOf("1.7") != -1 : exec
|
||||
+ "\n"
|
||||
+ ssh.exec("cat /tmp/" + taskName + "/" + taskName + ".sh /tmp/" + taskName + "/stdout.log /tmp/"
|
||||
+ taskName + "/stderr.log");
|
||||
|
@ -888,11 +888,13 @@ public abstract class BaseComputeServiceLiveTest<S, A, C extends ComputeServiceC
|
|||
}
|
||||
}
|
||||
|
||||
@AfterTest
|
||||
protected void cleanup() throws InterruptedException, ExecutionException, TimeoutException {
|
||||
@AfterClass(groups = { "integration", "live" })
|
||||
@Override
|
||||
protected void tearDownContext() {
|
||||
if (nodes != null) {
|
||||
testDestroyNodes();
|
||||
}
|
||||
super.tearDownContext();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -96,6 +96,7 @@ public abstract class BaseContextLiveTest<C extends Closeable> {
|
|||
/**
|
||||
* @see org.jclouds.providers.Providers#withId
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected ProviderMetadata<?, ?, C, ?> createProviderMetadata() {
|
||||
try {
|
||||
return (ProviderMetadata<?, ?, C, ?>) Providers.withId(provider);
|
||||
|
@ -107,6 +108,7 @@ public abstract class BaseContextLiveTest<C extends Closeable> {
|
|||
/**
|
||||
* @see org.jclouds.apis.Apis#withId
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected ApiMetadata<?, ?, C, ?> createApiMetadata() {
|
||||
try {
|
||||
return (ApiMetadata<?, ?, C, ?>) Apis.withId(provider);
|
||||
|
|
Loading…
Reference in New Issue