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.ConcurrentMap;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.TimeoutException;
|
|
||||||
|
|
||||||
import org.easymock.IArgumentMatcher;
|
import org.easymock.IArgumentMatcher;
|
||||||
import org.jclouds.compute.domain.ExecResponse;
|
import org.jclouds.compute.domain.ExecResponse;
|
||||||
|
@ -370,7 +369,7 @@ public class StubComputeServiceIntegrationTest extends
|
||||||
client.connect();
|
client.connect();
|
||||||
|
|
||||||
expect(client.exec("echo hello")).andReturn(new ExecResponse("hello", "", 0));
|
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();
|
client.disconnect();
|
||||||
}
|
}
|
||||||
|
@ -530,9 +529,4 @@ public class StubComputeServiceIntegrationTest extends
|
||||||
super.testDestroyNodes();
|
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.SshClient;
|
||||||
import org.jclouds.ssh.SshException;
|
import org.jclouds.ssh.SshException;
|
||||||
import org.jclouds.util.Strings2;
|
import org.jclouds.util.Strings2;
|
||||||
import org.testng.annotations.AfterTest;
|
import org.testng.annotations.AfterClass;
|
||||||
import org.testng.annotations.BeforeGroups;
|
import org.testng.annotations.BeforeGroups;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
|
@ -878,7 +878,7 @@ public abstract class BaseComputeServiceLiveTest<S, A, C extends ComputeServiceC
|
||||||
ExecResponse hello = ssh.exec("echo hello");
|
ExecResponse hello = ssh.exec("echo hello");
|
||||||
assertEquals(hello.getOutput().trim(), "hello");
|
assertEquals(hello.getOutput().trim(), "hello");
|
||||||
ExecResponse exec = ssh.exec("java -version");
|
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"
|
+ "\n"
|
||||||
+ ssh.exec("cat /tmp/" + taskName + "/" + taskName + ".sh /tmp/" + taskName + "/stdout.log /tmp/"
|
+ ssh.exec("cat /tmp/" + taskName + "/" + taskName + ".sh /tmp/" + taskName + "/stdout.log /tmp/"
|
||||||
+ taskName + "/stderr.log");
|
+ taskName + "/stderr.log");
|
||||||
|
@ -888,11 +888,13 @@ public abstract class BaseComputeServiceLiveTest<S, A, C extends ComputeServiceC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterTest
|
@AfterClass(groups = { "integration", "live" })
|
||||||
protected void cleanup() throws InterruptedException, ExecutionException, TimeoutException {
|
@Override
|
||||||
|
protected void tearDownContext() {
|
||||||
if (nodes != null) {
|
if (nodes != null) {
|
||||||
testDestroyNodes();
|
testDestroyNodes();
|
||||||
}
|
}
|
||||||
|
super.tearDownContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -96,6 +96,7 @@ public abstract class BaseContextLiveTest<C extends Closeable> {
|
||||||
/**
|
/**
|
||||||
* @see org.jclouds.providers.Providers#withId
|
* @see org.jclouds.providers.Providers#withId
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
protected ProviderMetadata<?, ?, C, ?> createProviderMetadata() {
|
protected ProviderMetadata<?, ?, C, ?> createProviderMetadata() {
|
||||||
try {
|
try {
|
||||||
return (ProviderMetadata<?, ?, C, ?>) Providers.withId(provider);
|
return (ProviderMetadata<?, ?, C, ?>) Providers.withId(provider);
|
||||||
|
@ -107,6 +108,7 @@ public abstract class BaseContextLiveTest<C extends Closeable> {
|
||||||
/**
|
/**
|
||||||
* @see org.jclouds.apis.Apis#withId
|
* @see org.jclouds.apis.Apis#withId
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
protected ApiMetadata<?, ?, C, ?> createApiMetadata() {
|
protected ApiMetadata<?, ?, C, ?> createApiMetadata() {
|
||||||
try {
|
try {
|
||||||
return (ApiMetadata<?, ?, C, ?>) Apis.withId(provider);
|
return (ApiMetadata<?, ?, C, ?>) Apis.withId(provider);
|
||||||
|
|
Loading…
Reference in New Issue