From 95e2c00aefd43c0d7aae30c098855d820e284707 Mon Sep 17 00:00:00 2001 From: "adrian.f.cole" Date: Mon, 29 Jun 2009 12:48:32 +0000 Subject: [PATCH] added notes about why gae times outaws/s3/perftest/src/test/java/org/jclouds/aws/s3/JCloudsGaePerformanceLiveTest.java git-svn-id: http://jclouds.googlecode.com/svn/trunk@1489 3d8758e0-26b5-11de-8745-db77d3ebf521 --- .../java/org/jclouds/aws/s3/S3IntegrationTest.java | 8 +++++--- .../aws/s3/commands/DeleteObjectIntegrationTest.java | 2 -- .../jclouds/aws/s3/JCloudsGaePerformanceLiveTest.java | 10 ++++++++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/aws/s3/core/src/test/java/org/jclouds/aws/s3/S3IntegrationTest.java b/aws/s3/core/src/test/java/org/jclouds/aws/s3/S3IntegrationTest.java index 56568ebb45..d2f48f1bcd 100644 --- a/aws/s3/core/src/test/java/org/jclouds/aws/s3/S3IntegrationTest.java +++ b/aws/s3/core/src/test/java/org/jclouds/aws/s3/S3IntegrationTest.java @@ -59,12 +59,14 @@ import com.google.common.collect.Iterables; import com.google.inject.Module; public class S3IntegrationTest { + protected static final String LOCAL_ENCODING = System.getProperty("file.encoding"); protected static final String TEST_STRING = " "; - public static long INCONSISTENCY_WINDOW = 1000; protected static final String sysAWSAccessKeyId = System .getProperty(S3Constants.PROPERTY_AWS_ACCESSKEYID); protected static final String sysAWSSecretAccessKey = System .getProperty(S3Constants.PROPERTY_AWS_SECRETACCESSKEY); + + public static long INCONSISTENCY_WINDOW = 1000; protected static int bucketCount = 20; protected static volatile int bucketIndex = 0; @@ -299,8 +301,8 @@ public class S3IntegrationTest { if (keys.size() > 0) { map.clear(); assertEquals(map.size(), 0, String.format( - "deleting %s, we still have %s left in bucket %s", keys, - map.keySet(), name)); + "deleting %s, we still have %s left in bucket %s, using encoding %s", + keys, map.keySet(), name, LOCAL_ENCODING)); } } catch (Exception e) { Utils. rethrowIfRuntimeOrSameType(e); diff --git a/aws/s3/core/src/test/java/org/jclouds/aws/s3/commands/DeleteObjectIntegrationTest.java b/aws/s3/core/src/test/java/org/jclouds/aws/s3/commands/DeleteObjectIntegrationTest.java index 8dd4ac5a8f..897abc1bbc 100644 --- a/aws/s3/core/src/test/java/org/jclouds/aws/s3/commands/DeleteObjectIntegrationTest.java +++ b/aws/s3/core/src/test/java/org/jclouds/aws/s3/commands/DeleteObjectIntegrationTest.java @@ -45,8 +45,6 @@ import org.testng.annotations.Test; @Test(groups = { "integration", "live" }, testName = "s3.DeleteObjectIntegrationTest") public class DeleteObjectIntegrationTest extends S3IntegrationTest { - private static final String LOCAL_ENCODING = System.getProperty("file.encoding"); - @Test void deleteObjectNotFound() throws Exception { String bucketName = getBucketName(); diff --git a/aws/s3/perftest/src/test/java/org/jclouds/aws/s3/JCloudsGaePerformanceLiveTest.java b/aws/s3/perftest/src/test/java/org/jclouds/aws/s3/JCloudsGaePerformanceLiveTest.java index c0ddc5df59..9e1193cd03 100644 --- a/aws/s3/perftest/src/test/java/org/jclouds/aws/s3/JCloudsGaePerformanceLiveTest.java +++ b/aws/s3/perftest/src/test/java/org/jclouds/aws/s3/JCloudsGaePerformanceLiveTest.java @@ -37,6 +37,14 @@ import com.google.inject.Module; @Test(sequential = true, testName = "s3.JCloudsGaePerformanceLiveTest", groups = { "live" }) public class JCloudsGaePerformanceLiveTest extends BaseJCloudsPerformance { + public JCloudsGaePerformanceLiveTest() { + super(); + // otherwise, we'll get timeout errors + // TODO sdk 1.2.3 should give the ability to set a higher timeout then 5 seconds allowing this + // to be removed + loopCount = 5; + } + @Override protected boolean putByteArray(String bucket, String key, byte[] data, String contentType) throws Exception { @@ -117,8 +125,6 @@ public class JCloudsGaePerformanceLiveTest extends BaseJCloudsPerformance { @Override protected Module createHttpModule() { - // otherwise, we'll get timeout errors - loopCount = 10; return new URLFetchServiceClientModule(); } } \ No newline at end of file