mirror of https://github.com/apache/jclouds.git
Cleaned up some of the "sandbox" tests (updated group IDs, versions, deprecated code etc.)
This commit is contained in:
parent
bcc4f8fa53
commit
03db8b0d45
|
@ -24,7 +24,7 @@
|
|||
<parent>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-demos-project</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jclouds-demo-getpath</artifactId>
|
||||
<name>jclouds getpath</name>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<parent>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-demos-project</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jclouds-demo-perftest</artifactId>
|
||||
<name>jclouds Performance test verses Amazon SDK implementation</name>
|
||||
|
@ -36,7 +36,7 @@
|
|||
<test.aws-s3.credential>${test.aws.credential}</test.aws-s3.credential>
|
||||
<test.initializer>org.jclouds.aws.s3.blobstore.integration.AWSS3TestInitializer</test.initializer>
|
||||
<jclouds.version>1.0-SNAPSHOT</jclouds.version>
|
||||
<gae.version>1.4.3</gae.version>
|
||||
<appengine.sdk.version>1.4.3</appengine.sdk.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -70,13 +70,6 @@
|
|||
<artifactId>jclouds-gae</artifactId>
|
||||
<version>${jclouds.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.appengine</groupId>
|
||||
<artifactId>appengine-tools-sdk</artifactId>
|
||||
<version>${gae.version}</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${appengine.home}/lib/appengine-tools-api.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-blobstore</artifactId>
|
||||
|
@ -102,20 +95,19 @@
|
|||
<dependency>
|
||||
<groupId>com.google.appengine</groupId>
|
||||
<artifactId>appengine-tools-sdk</artifactId>
|
||||
<version>${gae.version}</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${appengine.home}/lib/appengine-tools-api.jar</systemPath>
|
||||
<version>${appengine.sdk.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.appengine</groupId>
|
||||
<artifactId>appengine-api-stubs</artifactId>
|
||||
<version>${gae.version}</version>
|
||||
<version>${appengine.sdk.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.appengine</groupId>
|
||||
<artifactId>appengine-testing</artifactId>
|
||||
<version>${gae.version}</version>
|
||||
<version>${appengine.sdk.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -65,13 +65,12 @@ public class AmazonPerformanceLiveTest extends BasePerformanceLiveTest {
|
|||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected Future<?> putByteArray(final String bucket, final String key, final byte[] data, final String contentType) {
|
||||
|
||||
return exec.submit(new Callable() {
|
||||
return exec.submit(new Callable<String>() {
|
||||
@Override
|
||||
public Object call() throws Exception {
|
||||
public String call() throws Exception {
|
||||
ObjectMetadata md = new ObjectMetadata();
|
||||
md.setContentType(contentType);
|
||||
md.setContentLength(data.length);
|
||||
|
@ -80,26 +79,24 @@ public class AmazonPerformanceLiveTest extends BasePerformanceLiveTest {
|
|||
});
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected Future<?> putFile(final String bucket, final String key, final File data, String contentType) {
|
||||
|
||||
return exec.submit(new Callable() {
|
||||
return exec.submit(new Callable<String>() {
|
||||
@Override
|
||||
public Object call() throws Exception {
|
||||
public String call() throws Exception {
|
||||
return s3.putObject(new PutObjectRequest(bucket, key, data)).getETag();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected Future<?> putInputStream(final String bucket, final String key, final InputStream data,
|
||||
final String contentType) {
|
||||
|
||||
return exec.submit(new Callable() {
|
||||
return exec.submit(new Callable<String>() {
|
||||
@Override
|
||||
public Object call() throws Exception {
|
||||
public String call() throws Exception {
|
||||
ObjectMetadata md = new ObjectMetadata();
|
||||
md.setContentType(contentType);
|
||||
md.setContentLength(data.available());
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.jclouds.logging.Logger;
|
|||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.util.concurrent.Futures;
|
||||
import com.google.common.util.concurrent.JdkFutureAdapters;
|
||||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
|
||||
/**
|
||||
|
@ -162,7 +162,7 @@ public abstract class BasePerformanceLiveTest extends BaseBlobStoreIntegrationTe
|
|||
}
|
||||
|
||||
public ListenableFuture<?> get() {
|
||||
return Futures.makeListenable(putByteArray(bucketName, key.getAndIncrement() + "", test,
|
||||
return JdkFutureAdapters.listenInPoolThread(putByteArray(bucketName, key.getAndIncrement() + "", test,
|
||||
"application/octetstring"));
|
||||
}
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ public abstract class BasePerformanceLiveTest extends BaseBlobStoreIntegrationTe
|
|||
}
|
||||
|
||||
public ListenableFuture<?> get() {
|
||||
return Futures.makeListenable(putFile(bucketName, key.getAndIncrement() + "", file, "text/xml"));
|
||||
return JdkFutureAdapters.listenInPoolThread(putFile(bucketName, key.getAndIncrement() + "", file, "text/xml"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -193,7 +193,7 @@ public abstract class BasePerformanceLiveTest extends BaseBlobStoreIntegrationTe
|
|||
@Override
|
||||
public ListenableFuture<?> get() {
|
||||
|
||||
return Futures.makeListenable(putInputStream(bucketName, key.getAndIncrement() + "", new ByteArrayInputStream(
|
||||
return JdkFutureAdapters.listenInPoolThread(putInputStream(bucketName, key.getAndIncrement() + "", new ByteArrayInputStream(
|
||||
test), "application/octetstring"));
|
||||
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ public abstract class BasePerformanceLiveTest extends BaseBlobStoreIntegrationTe
|
|||
}
|
||||
|
||||
public ListenableFuture<?> get() {
|
||||
return Futures.makeListenable(putString(bucketName, key.getAndIncrement() + "", testString, "text/plain"));
|
||||
return JdkFutureAdapters.listenInPoolThread(putString(bucketName, key.getAndIncrement() + "", testString, "text/plain"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ import java.util.concurrent.Future;
|
|||
|
||||
import org.jets3t.service.S3Service;
|
||||
import org.jets3t.service.impl.rest.httpclient.RestS3Service;
|
||||
import org.jets3t.service.model.S3Object;
|
||||
import org.jets3t.service.security.AWSCredentials;
|
||||
import org.testng.ITestContext;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
|
@ -95,23 +96,21 @@ public class Jets3tPerformanceLiveTest extends BasePerformanceLiveTest {
|
|||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected Future<?> putFile(final String bucket, String key, File data, String contentType) {
|
||||
final org.jets3t.service.model.S3Object object = new org.jets3t.service.model.S3Object(key);
|
||||
object.setContentType(contentType);
|
||||
object.setDataInputFile(data);
|
||||
object.setContentLength(data.length());
|
||||
return exec.submit(new Callable() {
|
||||
return exec.submit(new Callable<S3Object>() {
|
||||
@Override
|
||||
public Object call() throws Exception {
|
||||
public S3Object call() throws Exception {
|
||||
return jetClient.putObject(bucket, object);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected Future<?> putInputStream(final String bucket, String key, InputStream data, String contentType) {
|
||||
final org.jets3t.service.model.S3Object object = new org.jets3t.service.model.S3Object(key);
|
||||
|
@ -122,9 +121,9 @@ public class Jets3tPerformanceLiveTest extends BasePerformanceLiveTest {
|
|||
} catch (IOException e) {
|
||||
Throwables.propagate(e);
|
||||
}
|
||||
return exec.submit(new Callable() {
|
||||
return exec.submit(new Callable<S3Object>() {
|
||||
@Override
|
||||
public Object call() throws Exception {
|
||||
public S3Object call() throws Exception {
|
||||
return jetClient.putObject(bucket, object);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<parent>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-demos-project</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jclouds-demo-simpledb</artifactId>
|
||||
<name>jclouds simpledb sample that putAttributes and select it</name>
|
||||
|
@ -32,8 +32,8 @@
|
|||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.api</groupId>
|
||||
<artifactId>simpledb</artifactId>
|
||||
<groupId>org.jclouds.provider</groupId>
|
||||
<artifactId>aws-simpledb</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<parent>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-demos-project</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jclouds-demo-speedtest-azurequeue</artifactId>
|
||||
<name>Speed tests of Azure's queue offering</name>
|
||||
|
@ -32,13 +32,13 @@
|
|||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<groupId>org.jclouds.driver</groupId>
|
||||
<artifactId>jclouds-enterprise</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>jclouds-azure</artifactId>
|
||||
<groupId>org.jclouds.provider</groupId>
|
||||
<artifactId>azurequeue</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<parent>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-demos-project</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jclouds-demo-speedtest-sqs</artifactId>
|
||||
<name>Speed tests of SQS across regions</name>
|
||||
|
@ -32,7 +32,12 @@
|
|||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<groupId>org.jclouds.api</groupId>
|
||||
<artifactId>sqs</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.driver</groupId>
|
||||
<artifactId>jclouds-enterprise</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
*/
|
||||
package org.jclouds.aws.sqs;
|
||||
|
||||
import static org.jclouds.aws.sqs.options.ListQueuesOptions.Builder.queuePrefix;
|
||||
import static org.jclouds.concurrent.FutureIterables.awaitCompletion;
|
||||
import static org.jclouds.sqs.options.ListQueuesOptions.Builder.queuePrefix;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
@ -27,7 +27,6 @@ import java.util.SortedSet;
|
|||
import java.util.concurrent.Future;
|
||||
|
||||
import org.jclouds.aws.domain.Region;
|
||||
import org.jclouds.aws.sqs.domain.Queue;
|
||||
import org.jclouds.concurrent.MoreExecutors;
|
||||
import org.jclouds.enterprise.config.EnterpriseConfigurationModule;
|
||||
import org.jclouds.logging.ConsoleLogger;
|
||||
|
@ -35,6 +34,9 @@ import org.jclouds.logging.Logger;
|
|||
import org.jclouds.logging.config.NullLoggingModule;
|
||||
import org.jclouds.rest.RestContext;
|
||||
import org.jclouds.rest.RestContextFactory;
|
||||
import org.jclouds.sqs.SQSAsyncClient;
|
||||
import org.jclouds.sqs.SQSClient;
|
||||
import org.jclouds.sqs.domain.Queue;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Maps;
|
||||
|
|
Loading…
Reference in New Issue