mirror of https://github.com/apache/jclouds.git
elastichosts test glitches
This commit is contained in:
parent
a0c383334e
commit
80d3b17720
|
@ -33,27 +33,13 @@
|
|||
<description>jclouds components to access elasticstack</description>
|
||||
<packaging>bundle</packaging>
|
||||
|
||||
<!-- bootstrapping: need to fetch the project POM -->
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>sonatype-nexus-snapshots</id>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<properties>
|
||||
<test.elasticstack.endpoint>https://api-lon-p.elastichosts.com</test.elasticstack.endpoint>
|
||||
<test.elasticstack.api-version>1.0</test.elasticstack.api-version>
|
||||
<test.elasticstack.api-version>2.0</test.elasticstack.api-version>
|
||||
<test.elasticstack.build-version></test.elasticstack.build-version>
|
||||
<test.elasticstack.identity>FIXME</test.elasticstack.identity>
|
||||
<test.elasticstack.credential>FIXME</test.elasticstack.credential>
|
||||
<test.elasticstack.template>imageId=38df0986-4d85-4b76-b502-3878ffc80161</test.elasticstack.template>
|
||||
<test.elasticstack.template>imageId=38df0986-4d85-4b76-b502-3878ffc80161,loginUser=toor</test.elasticstack.template>
|
||||
<jclouds.osgi.export>org.jclouds.elasticstack*;version="${project.version}"</jclouds.osgi.export>
|
||||
<jclouds.osgi.import>
|
||||
org.jclouds.compute.internal;version="${project.version}",
|
||||
|
|
|
@ -50,7 +50,7 @@ import org.jclouds.ssh.SshClient;
|
|||
import org.jclouds.sshj.config.SshjSshClientModule;
|
||||
import org.jclouds.util.Strings2;
|
||||
import org.testng.annotations.AfterGroups;
|
||||
import org.testng.annotations.BeforeGroups;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
|
@ -67,10 +67,8 @@ import com.google.inject.Guice;
|
|||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "ElasticStackClientLiveTest")
|
||||
public class ElasticStackClientLiveTest
|
||||
extends
|
||||
BaseComputeServiceContextLiveTest {
|
||||
|
||||
public class ElasticStackClientLiveTest extends BaseComputeServiceContextLiveTest {
|
||||
|
||||
public ElasticStackClientLiveTest() {
|
||||
provider = "elasticstack";
|
||||
}
|
||||
|
@ -84,23 +82,19 @@ public class ElasticStackClientLiveTest
|
|||
protected Predicate<DriveInfo> driveNotClaimed;
|
||||
protected String imageId;
|
||||
|
||||
@BeforeGroups(groups = { "integration", "live" })
|
||||
@Override
|
||||
@BeforeClass(groups = { "integration", "live" })
|
||||
public void setupContext() {
|
||||
super.setupContext();
|
||||
cloudStackContext = view.unwrap();
|
||||
imageId = view.getComputeService().templateBuilder().build().getImage().getId();
|
||||
|
||||
client = cloudStackContext.getApi();
|
||||
client = view.unwrap(ElasticStackApiMetadata.CONTEXT_TOKEN).getApi();
|
||||
driveNotClaimed = new RetryablePredicate<DriveInfo>(Predicates.not(new DriveClaimed(client)), maxDriveImageTime,
|
||||
1, TimeUnit.SECONDS);
|
||||
socketTester = new RetryablePredicate<HostAndPort>(new InetSocketAddressConnect(), maxDriveImageTime, 1,
|
||||
TimeUnit.SECONDS);
|
||||
|
||||
if (template == null || template.getImageId() == null) {
|
||||
imageId = view.getComputeService().templateBuilder().build().getImage().getId();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testListServers() throws Exception {
|
||||
Set<String> servers = client.listServers();
|
||||
|
|
Loading…
Reference in New Issue