diff --git a/aws/perftest/pom.xml b/aws/perftest/pom.xml index eb97541eae..35f13911ef 100644 --- a/aws/perftest/pom.xml +++ b/aws/perftest/pom.xml @@ -48,6 +48,16 @@ Performance test verses Amazon samples implementation + + ${project.groupId} + jclouds-joda + ${project.version} + + + ${project.groupId} + jclouds-bouncycastle + ${project.version} + ${project.groupId} jclouds-aws diff --git a/aws/perftest/src/test/java/org/jclouds/aws/s3/BasePerformanceLiveTest.java b/aws/perftest/src/test/java/org/jclouds/aws/s3/BasePerformanceLiveTest.java index 0788132bc7..7c8f0a813f 100755 --- a/aws/perftest/src/test/java/org/jclouds/aws/s3/BasePerformanceLiveTest.java +++ b/aws/perftest/src/test/java/org/jclouds/aws/s3/BasePerformanceLiveTest.java @@ -57,7 +57,7 @@ public abstract class BasePerformanceLiveTest extends containerCount = 1; } protected int timeoutSeconds = 15; - protected int loopCount = 1000; + protected int loopCount = 100; protected ExecutorService exec; protected CompletionService completer; diff --git a/aws/perftest/src/test/java/org/jclouds/aws/s3/JCloudsGaePerformanceLiveTest.java b/aws/perftest/src/test/java/org/jclouds/aws/s3/JCloudsGaePerformanceLiveTest.java index 6d598b3b81..89dc45fca4 100755 --- a/aws/perftest/src/test/java/org/jclouds/aws/s3/JCloudsGaePerformanceLiveTest.java +++ b/aws/perftest/src/test/java/org/jclouds/aws/s3/JCloudsGaePerformanceLiveTest.java @@ -29,14 +29,16 @@ import java.util.Map; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; +import org.jclouds.date.joda.config.JodaDateServiceModule; +import org.jclouds.encryption.bouncycastle.config.BouncyCastleEncryptionServiceModule; import org.jclouds.gae.config.GaeHttpCommandExecutorServiceModule; +import org.jclouds.http.config.ConfiguresHttpCommandExecutorService; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import org.testng.v6.Maps; import com.google.appengine.tools.development.ApiProxyLocalImpl; import com.google.apphosting.api.ApiProxy; -import com.google.inject.Module; /** * @@ -155,6 +157,16 @@ public class JCloudsGaePerformanceLiveTest extends BaseJCloudsPerformanceLiveTes }); } + @ConfiguresHttpCommandExecutorService + private static final class Module extends GaeHttpCommandExecutorServiceModule { + @Override + protected void configure() { + super.configure(); + install(new JodaDateServiceModule()); + install(new BouncyCastleEncryptionServiceModule()); + } + } + class TestEnvironment implements ApiProxy.Environment { public String getAppId() { return "Unit Tests"; @@ -198,6 +210,6 @@ public class JCloudsGaePerformanceLiveTest extends BaseJCloudsPerformanceLiveTes @Override protected Module createHttpModule() { - return new GaeHttpCommandExecutorServiceModule(); + return new Module(); } } \ No newline at end of file diff --git a/aws/perftest/src/test/java/org/jclouds/aws/s3/JCloudsNioPerformanceLiveTest.java b/aws/perftest/src/test/java/org/jclouds/aws/s3/JCloudsNioPerformanceLiveTest.java index 2557e670a6..bcba203669 100755 --- a/aws/perftest/src/test/java/org/jclouds/aws/s3/JCloudsNioPerformanceLiveTest.java +++ b/aws/perftest/src/test/java/org/jclouds/aws/s3/JCloudsNioPerformanceLiveTest.java @@ -23,16 +23,27 @@ */ package org.jclouds.aws.s3; +import org.jclouds.date.joda.config.JodaDateServiceModule; +import org.jclouds.encryption.bouncycastle.config.BouncyCastleEncryptionServiceModule; +import org.jclouds.http.config.ConfiguresHttpCommandExecutorService; import org.jclouds.http.httpnio.config.NioTransformingHttpCommandExecutorServiceModule; import org.testng.annotations.Test; -import com.google.inject.Module; - @Test(sequential = true, testName = "perftest.JCloudsNioPerformanceLiveTest", groups = { "live" }) public class JCloudsNioPerformanceLiveTest extends BaseJCloudsPerformanceLiveTest { + @ConfiguresHttpCommandExecutorService + private static final class Module extends NioTransformingHttpCommandExecutorServiceModule { + @Override + protected void configure() { + super.configure(); + install(new JodaDateServiceModule()); + install(new BouncyCastleEncryptionServiceModule()); + } + } + @Override protected Module createHttpModule() { - return new NioTransformingHttpCommandExecutorServiceModule(); + return new Module(); } } \ No newline at end of file diff --git a/aws/perftest/src/test/java/org/jclouds/aws/s3/JCloudsPerformanceLiveTest.java b/aws/perftest/src/test/java/org/jclouds/aws/s3/JCloudsPerformanceLiveTest.java index b7701c6b1d..b0ba0ea0ea 100755 --- a/aws/perftest/src/test/java/org/jclouds/aws/s3/JCloudsPerformanceLiveTest.java +++ b/aws/perftest/src/test/java/org/jclouds/aws/s3/JCloudsPerformanceLiveTest.java @@ -22,11 +22,13 @@ * ==================================================================== */ package org.jclouds.aws.s3; + +import org.jclouds.date.joda.config.JodaDateServiceModule; +import org.jclouds.encryption.bouncycastle.config.BouncyCastleEncryptionServiceModule; +import org.jclouds.http.config.ConfiguresHttpCommandExecutorService; import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule; import org.testng.annotations.Test; -import com.google.inject.Module; - /** * Tests the default JClouds client. * @@ -35,8 +37,18 @@ import com.google.inject.Module; */ @Test(sequential = true, timeOut = 2 * 60 * 1000, testName = "perftest.JCloudsPerformanceLiveTest", groups = { "live" }) public class JCloudsPerformanceLiveTest extends BaseJCloudsPerformanceLiveTest { + @ConfiguresHttpCommandExecutorService + private static final class Module extends JavaUrlHttpCommandExecutorServiceModule { + @Override + protected void configure() { + super.configure(); + install(new JodaDateServiceModule()); + install(new BouncyCastleEncryptionServiceModule()); + } + } + @Override protected Module createHttpModule() { - return new JavaUrlHttpCommandExecutorServiceModule(); + return new Module(); } } \ No newline at end of file