From 100d43360ae9ae2960b44235100d7c56fb74aedc Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Sun, 5 Oct 2014 18:04:32 -0700 Subject: [PATCH] JCLOUDS-150 clear remaining async stuff from aws --- .../src/main/java/org/jclouds/s3/S3ApiMetadata.java | 3 +-- .../jclouds/sqs/features/PermissionApiLiveTest.java | 13 +++---------- .../org/jclouds/aws/filters/FormSignerTest.java | 9 +++------ 3 files changed, 7 insertions(+), 18 deletions(-) diff --git a/apis/s3/src/main/java/org/jclouds/s3/S3ApiMetadata.java b/apis/s3/src/main/java/org/jclouds/s3/S3ApiMetadata.java index 2923c152aa..a35928f46c 100644 --- a/apis/s3/src/main/java/org/jclouds/s3/S3ApiMetadata.java +++ b/apis/s3/src/main/java/org/jclouds/s3/S3ApiMetadata.java @@ -30,7 +30,6 @@ import java.util.Properties; import org.jclouds.apis.ApiMetadata; import org.jclouds.rest.internal.BaseHttpApiMetadata; -import org.jclouds.rest.internal.BaseRestApiMetadata; import org.jclouds.s3.blobstore.S3BlobStoreContext; import org.jclouds.s3.blobstore.config.S3BlobStoreContextModule; import org.jclouds.s3.config.S3HttpApiModule; @@ -69,7 +68,7 @@ public class S3ApiMetadata extends BaseHttpApiMetadata { } public static Properties defaultProperties() { - Properties properties = BaseRestApiMetadata.defaultProperties(); + Properties properties = BaseHttpApiMetadata.defaultProperties(); properties.setProperty(PROPERTY_AUTH_TAG, "AWS"); properties.setProperty(PROPERTY_HEADER_TAG, S3Headers.DEFAULT_AMAZON_HEADERTAG); properties.setProperty(PROPERTY_S3_SERVICE_PATH, "/"); diff --git a/apis/sqs/src/test/java/org/jclouds/sqs/features/PermissionApiLiveTest.java b/apis/sqs/src/test/java/org/jclouds/sqs/features/PermissionApiLiveTest.java index aad04738a6..2c96ab2c1c 100644 --- a/apis/sqs/src/test/java/org/jclouds/sqs/features/PermissionApiLiveTest.java +++ b/apis/sqs/src/test/java/org/jclouds/sqs/features/PermissionApiLiveTest.java @@ -17,7 +17,7 @@ package org.jclouds.sqs.features; import static com.google.common.util.concurrent.MoreExecutors.newDirectExecutorService; -import static org.jclouds.providers.AnonymousProviderMetadata.forClientMappedToAsyncClientOnEndpoint; +import static org.jclouds.providers.AnonymousProviderMetadata.forApiOnEndpoint; import static org.jclouds.sqs.reference.SQSParameters.ACTION; import static org.testng.Assert.assertEquals; @@ -39,7 +39,6 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import com.google.common.collect.ImmutableSet; -import com.google.common.util.concurrent.ListenableFuture; import com.google.inject.Module; @Test(groups = "live", singleThreaded = true, testName = "PermissionApiLiveTest") @@ -57,15 +56,11 @@ public class PermissionApiLiveTest extends BaseSQSApiLiveTest { } interface AnonymousAttributesApi extends Closeable { - String getQueueArn(); - } - - interface AnonymousAttributesAsyncApi extends Closeable { @POST @Path("/") @FormParams(keys = { ACTION, "AttributeName.1" }, values = { "GetQueueAttributes", "QueueArn" }) @XMLResponseParser(ValueHandler.class) - ListenableFuture getQueueArn(); + String getQueueArn(); } public void testAddAnonymousPermission() throws InterruptedException { @@ -95,9 +90,7 @@ public class PermissionApiLiveTest extends BaseSQSApiLiveTest { } private AnonymousAttributesApi getAnonymousAttributesApi(URI queue) { - return ContextBuilder.newBuilder( - forClientMappedToAsyncClientOnEndpoint(AnonymousAttributesApi.class, - AnonymousAttributesAsyncApi.class, queue.toASCIIString())) + return ContextBuilder.newBuilder(forApiOnEndpoint(AnonymousAttributesApi.class, queue.toASCIIString())) .modules(ImmutableSet. of(new ExecutorServiceModule(newDirectExecutorService(), newDirectExecutorService()))) .buildApi(AnonymousAttributesApi.class); } diff --git a/apis/sts/src/test/java/org/jclouds/aws/filters/FormSignerTest.java b/apis/sts/src/test/java/org/jclouds/aws/filters/FormSignerTest.java index 2b03358702..2325751bcf 100644 --- a/apis/sts/src/test/java/org/jclouds/aws/filters/FormSignerTest.java +++ b/apis/sts/src/test/java/org/jclouds/aws/filters/FormSignerTest.java @@ -18,6 +18,7 @@ package org.jclouds.aws.filters; import static javax.ws.rs.HttpMethod.GET; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_HEADER_TAG; +import static org.jclouds.providers.AnonymousProviderMetadata.forApiOnEndpoint; import static org.testng.Assert.assertEquals; import org.jclouds.ContextBuilder; @@ -25,10 +26,8 @@ import org.jclouds.aws.xml.SessionCredentialsHandlerTest; import org.jclouds.date.TimeStamp; import org.jclouds.domain.Credentials; import org.jclouds.http.HttpRequest; -import org.jclouds.http.IntegrationTestAsyncClient; import org.jclouds.http.IntegrationTestClient; import org.jclouds.logging.config.NullLoggingModule; -import org.jclouds.providers.AnonymousProviderMetadata; import org.jclouds.rest.RequestSigner; import org.jclouds.rest.internal.BaseRestApiTest.MockModule; import org.testng.annotations.Test; @@ -36,11 +35,11 @@ import org.testng.annotations.Test; import com.google.common.base.Suppliers; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMultimap; +import com.google.common.net.HttpHeaders; import com.google.inject.AbstractModule; import com.google.inject.Injector; import com.google.inject.Module; import com.google.inject.name.Names; -import com.google.common.net.HttpHeaders; /** * Tests behavior of {@code FormSigner} */ @@ -50,9 +49,7 @@ import com.google.common.net.HttpHeaders; public class FormSignerTest { public static Injector injector(Credentials creds) { return ContextBuilder - .newBuilder( - AnonymousProviderMetadata.forClientMappedToAsyncClientOnEndpoint(IntegrationTestClient.class, - IntegrationTestAsyncClient.class, "http://localhost")) + .newBuilder(forApiOnEndpoint(IntegrationTestClient.class, "http://localhost")) .credentialsSupplier(Suppliers. ofInstance(creds)).apiVersion("apiVersion") .modules(ImmutableList. of(new MockModule(), new NullLoggingModule(), new AbstractModule() { @Override