diff --git a/apis/s3/src/test/java/org/jclouds/s3/filters/RequestAuthorizeSignatureTest.java b/apis/s3/src/test/java/org/jclouds/s3/filters/RequestAuthorizeSignatureTest.java index 2d0d2fee19..7f438a7316 100644 --- a/apis/s3/src/test/java/org/jclouds/s3/filters/RequestAuthorizeSignatureTest.java +++ b/apis/s3/src/test/java/org/jclouds/s3/filters/RequestAuthorizeSignatureTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2010 Cloud Conscious, LLC. + * Copyright (C) 2011 Cloud Conscious, LLC. * * ==================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,7 +16,6 @@ * limitations under the License. * ==================================================================== */ - package org.jclouds.s3.filters; import static org.jclouds.Constants.PROPERTY_SESSION_INTERVAL; @@ -61,13 +60,13 @@ public class RequestAuthorizeSignatureTest extends BaseS3AsyncClientTest { */ @Test(threadPoolSize = 3, dataProvider = "dataProvider", timeOut = 10000) void testIdempotent(HttpRequest request) { - filter.filter(request); + request = filter.filter(request); String signature = request.getFirstHeaderOrNull(HttpHeaders.AUTHORIZATION); String date = request.getFirstHeaderOrNull(HttpHeaders.DATE); int iterations = 1; while (request.getFirstHeaderOrNull(HttpHeaders.DATE).equals(date)) { date = request.getFirstHeaderOrNull(HttpHeaders.DATE); - filter.filter(request); + request = filter.filter(request); if (request.getFirstHeaderOrNull(HttpHeaders.DATE).equals(date)) assert signature.equals(request.getFirstHeaderOrNull(HttpHeaders.AUTHORIZATION)) : String.format( "sig: %s != %s on attempt %s", signature, request.getFirstHeaderOrNull(HttpHeaders.AUTHORIZATION), diff --git a/apis/s3/src/test/java/org/jclouds/s3/xml/ListBucketHandlerTest.java b/apis/s3/src/test/java/org/jclouds/s3/xml/ListBucketHandlerTest.java index f2d8b75b03..2157739cec 100644 --- a/apis/s3/src/test/java/org/jclouds/s3/xml/ListBucketHandlerTest.java +++ b/apis/s3/src/test/java/org/jclouds/s3/xml/ListBucketHandlerTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2010 Cloud Conscious, LLC. + * Copyright (C) 2011 Cloud Conscious, LLC. * * ==================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,7 +16,6 @@ * limitations under the License. * ==================================================================== */ - package org.jclouds.s3.xml; import static org.testng.Assert.assertEquals; @@ -24,22 +23,23 @@ import static org.testng.Assert.assertEquals; import java.io.InputStream; import java.util.TreeSet; +import org.jclouds.crypto.CryptoStreams; +import org.jclouds.date.DateService; +import org.jclouds.http.HttpException; +import org.jclouds.http.functions.BaseHandlerTest; +import org.jclouds.http.functions.ParseSax; import org.jclouds.s3.domain.CanonicalUser; import org.jclouds.s3.domain.ListBucketResponse; import org.jclouds.s3.domain.ObjectMetadata; import org.jclouds.s3.domain.ObjectMetadata.StorageClass; import org.jclouds.s3.domain.internal.BucketListObjectMetadata; import org.jclouds.s3.domain.internal.ListBucketResponseImpl; -import org.jclouds.crypto.CryptoStreams; -import org.jclouds.date.DateService; -import org.jclouds.http.HttpException; -import org.jclouds.http.functions.BaseHandlerTest; -import org.jclouds.http.functions.ParseSax; import org.jclouds.util.Strings2; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableSet; /** * Tests behavior of {@code ListBucketHandler} @@ -102,7 +102,7 @@ public class ListBucketHandlerTest extends BaseHandlerTest { ListBucketResponse result = (ListBucketResponse) factory.create(injector.getInstance(ListBucketHandler.class)) .parse(is); - assertEquals(result, expected); + assertEquals(ImmutableSet.copyOf(result).toString(), ImmutableSet.copyOf(expected).toString()); } ParseSax createParser() { diff --git a/apis/swift/src/test/java/org/jclouds/openstack/swift/domain/internal/ParseObjectInfoListFromJsonResponseTest.java b/apis/swift/src/test/java/org/jclouds/openstack/swift/domain/internal/ParseObjectInfoListFromJsonResponseTest.java index 37ad5fb246..b2e41fe31d 100644 --- a/apis/swift/src/test/java/org/jclouds/openstack/swift/domain/internal/ParseObjectInfoListFromJsonResponseTest.java +++ b/apis/swift/src/test/java/org/jclouds/openstack/swift/domain/internal/ParseObjectInfoListFromJsonResponseTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2010 Cloud Conscious, LLC. + * Copyright (C) 2011 Cloud Conscious, LLC. * * ==================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,7 +16,6 @@ * limitations under the License. * ==================================================================== */ - package org.jclouds.openstack.swift.domain.internal; import static org.easymock.EasyMock.expect; @@ -25,7 +24,6 @@ import static org.easymock.classextension.EasyMock.replay; import static org.testng.Assert.assertEquals; import java.io.InputStream; -import java.util.Set; import org.jclouds.crypto.CryptoStreams; import org.jclouds.date.internal.SimpleDateFormatDateService; @@ -39,7 +37,8 @@ import org.jclouds.rest.internal.GeneratedHttpRequest; import org.testng.annotations.Test; import com.google.common.collect.ImmutableList; -import com.google.common.collect.Sets; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.ImmutableSet.Builder; import com.google.inject.AbstractModule; import com.google.inject.Guice; import com.google.inject.Injector; @@ -63,7 +62,7 @@ public class ParseObjectInfoListFromJsonResponseTest { public void testApplyInputStream() { InputStream is = getClass().getResourceAsStream("/test_list_container.json"); - Set expects = Sets.newLinkedHashSet(); + Builder expects = ImmutableSet.builder(); ObjectInfoImpl one = i.getInstance(ObjectInfoImpl.class); one.name = "test_obj_1"; one.hash = CryptoStreams.hex("4281c348eaf83e70ddce0e07221c3d28"); @@ -85,6 +84,6 @@ public class ParseObjectInfoListFromJsonResponseTest { replay(request); ParseObjectInfoListFromJsonResponse parser = i.getInstance(ParseObjectInfoListFromJsonResponse.class); parser.setContext(request); - assertEquals(parser.apply(is), expects); + assertEquals(ImmutableSet.copyOf(parser.apply(is)), expects.build()); } } diff --git a/core/src/test/java/org/jclouds/PerformanceTest.java b/core/src/test/java/org/jclouds/PerformanceTest.java index 700cf3edfd..067a7a4256 100644 --- a/core/src/test/java/org/jclouds/PerformanceTest.java +++ b/core/src/test/java/org/jclouds/PerformanceTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2010 Cloud Conscious, LLC. + * Copyright (C) 2011 Cloud Conscious, LLC. * * ==================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,7 +16,6 @@ * limitations under the License. * ==================================================================== */ - package org.jclouds; import java.util.List; @@ -40,7 +39,7 @@ import org.testng.annotations.Test; @Test(groups="performance") public abstract class PerformanceTest { protected static int LOOP_COUNT = 1000; - protected static int THREAD_COUNT = 1000; + protected static int THREAD_COUNT = 100; protected ExecutorService exec; @BeforeTest diff --git a/demos/googleappengine/pom.xml b/demos/googleappengine/pom.xml index 973a153b27..165894670b 100644 --- a/demos/googleappengine/pom.xml +++ b/demos/googleappengine/pom.xml @@ -25,11 +25,11 @@ org.jclouds jclouds-project - 1.0-beta-9b-SNAPSHOT + 1.0-beta-9c-SNAPSHOT ../../project/pom.xml org.jclouds.examples - 1.0-beta-9b-SNAPSHOT + 1.0-beta-9c-SNAPSHOT jclouds-googleappengine-example war JClouds Sample for Google App Engine