mirror of https://github.com/apache/jclouds.git
updated perftest to use joda/bouncycastle
git-svn-id: http://jclouds.googlecode.com/svn/trunk@2412 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
parent
01bb58d712
commit
8023ccefff
|
@ -48,6 +48,16 @@
|
|||
<description>Performance test verses Amazon samples implementation</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>jclouds-joda</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>jclouds-bouncycastle</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>jclouds-aws</artifactId>
|
||||
|
|
|
@ -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<Boolean> completer;
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue