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>
|
<description>jclouds components to access elasticstack</description>
|
||||||
<packaging>bundle</packaging>
|
<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>
|
<properties>
|
||||||
<test.elasticstack.endpoint>https://api-lon-p.elastichosts.com</test.elasticstack.endpoint>
|
<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.build-version></test.elasticstack.build-version>
|
||||||
<test.elasticstack.identity>FIXME</test.elasticstack.identity>
|
<test.elasticstack.identity>FIXME</test.elasticstack.identity>
|
||||||
<test.elasticstack.credential>FIXME</test.elasticstack.credential>
|
<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.export>org.jclouds.elasticstack*;version="${project.version}"</jclouds.osgi.export>
|
||||||
<jclouds.osgi.import>
|
<jclouds.osgi.import>
|
||||||
org.jclouds.compute.internal;version="${project.version}",
|
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.sshj.config.SshjSshClientModule;
|
||||||
import org.jclouds.util.Strings2;
|
import org.jclouds.util.Strings2;
|
||||||
import org.testng.annotations.AfterGroups;
|
import org.testng.annotations.AfterGroups;
|
||||||
import org.testng.annotations.BeforeGroups;
|
import org.testng.annotations.BeforeClass;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
import com.google.common.base.Predicate;
|
import com.google.common.base.Predicate;
|
||||||
|
@ -67,9 +67,7 @@ import com.google.inject.Guice;
|
||||||
* @author Adrian Cole
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
@Test(groups = "live", singleThreaded = true, testName = "ElasticStackClientLiveTest")
|
@Test(groups = "live", singleThreaded = true, testName = "ElasticStackClientLiveTest")
|
||||||
public class ElasticStackClientLiveTest
|
public class ElasticStackClientLiveTest extends BaseComputeServiceContextLiveTest {
|
||||||
extends
|
|
||||||
BaseComputeServiceContextLiveTest {
|
|
||||||
|
|
||||||
public ElasticStackClientLiveTest() {
|
public ElasticStackClientLiveTest() {
|
||||||
provider = "elasticstack";
|
provider = "elasticstack";
|
||||||
|
@ -84,21 +82,17 @@ public class ElasticStackClientLiveTest
|
||||||
protected Predicate<DriveInfo> driveNotClaimed;
|
protected Predicate<DriveInfo> driveNotClaimed;
|
||||||
protected String imageId;
|
protected String imageId;
|
||||||
|
|
||||||
@BeforeGroups(groups = { "integration", "live" })
|
|
||||||
@Override
|
@Override
|
||||||
|
@BeforeClass(groups = { "integration", "live" })
|
||||||
public void setupContext() {
|
public void setupContext() {
|
||||||
super.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,
|
driveNotClaimed = new RetryablePredicate<DriveInfo>(Predicates.not(new DriveClaimed(client)), maxDriveImageTime,
|
||||||
1, TimeUnit.SECONDS);
|
1, TimeUnit.SECONDS);
|
||||||
socketTester = new RetryablePredicate<HostAndPort>(new InetSocketAddressConnect(), maxDriveImageTime, 1,
|
socketTester = new RetryablePredicate<HostAndPort>(new InetSocketAddressConnect(), maxDriveImageTime, 1,
|
||||||
TimeUnit.SECONDS);
|
TimeUnit.SECONDS);
|
||||||
|
|
||||||
if (template == null || template.getImageId() == null) {
|
|
||||||
imageId = view.getComputeService().templateBuilder().build().getImage().getId();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue