You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ad...@apache.org on 2014/10/12 18:05:54 UTC
git commit: JCLOUDS-40 clear remaining references to Async.
Repository: jclouds
Updated Branches:
refs/heads/master 3e082c894 -> d735a9fa2
JCLOUDS-40 clear remaining references to Async.
Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/d735a9fa
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/d735a9fa
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/d735a9fa
Branch: refs/heads/master
Commit: d735a9fa211129b16872aacf11f03bc2d709fde7
Parents: 3e082c8
Author: Adrian Cole <ad...@gmail.com>
Authored: Fri Oct 10 17:54:48 2014 -0700
Committer: Adrian Cole <ad...@gmail.com>
Committed: Sun Oct 12 09:05:35 2014 -0700
----------------------------------------------------------------------
.../jclouds/atmos/blobstore/AtmosBlobStore.java | 4 +-
.../org/jclouds/ec2/domain/ImageAttribute.java | 8 --
.../org/jclouds/ec2/domain/InstanceState.java | 8 --
.../org/jclouds/ec2/domain/InstanceType.java | 8 --
core/src/main/clojure/org/jclouds/core.clj | 5 +-
core/src/main/java/org/jclouds/View.java | 2 +-
.../main/java/org/jclouds/apis/ApiMetadata.java | 2 +-
.../main/java/org/jclouds/rest/RestContext.java | 57 -------------
.../jclouds/rest/config/InvocationConfig.java | 2 +-
.../config/ReadAnnotationsAndProperties.java | 6 +-
.../internal/InvokeAndCallGetOnFutures.java | 87 --------------------
.../jclouds/rest/internal/RestContextImpl.java | 69 ----------------
.../ReadAnnotationsAndPropertiesTest.java | 16 +---
...graphicallyAtOrAfterSinceApiVersionTest.java | 22 ++---
...tpCommandExecutorServiceIntegrationTest.java | 24 +-----
.../org/jclouds/aws/s3/AWSS3ClientTest.java | 2 +-
.../features/EmailAccountApiExpectTest.java | 2 +-
.../features/DatacenterApiExpectTest.java | 5 +-
.../SoftwareDescriptionApiExpectTest.java | 5 +-
19 files changed, 29 insertions(+), 305 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d735a9fa/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosBlobStore.java
----------------------------------------------------------------------
diff --git a/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosBlobStore.java b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosBlobStore.java
index 0a1be34..fd6b2bc 100644
--- a/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosBlobStore.java
+++ b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosBlobStore.java
@@ -97,8 +97,8 @@ public class AtmosBlobStore extends BaseBlobStore {
}
/**
- * This implementation invokes {@link AtmosAsyncClient#deletePath} followed by
- * {@link AtmosAsyncClient#pathExists} until it is true.
+ * This implementation invokes {@link AtmosClient#deletePath} followed by
+ * {@link AtmosClient#pathExists} until it is true.
*/
protected boolean deleteAndVerifyContainerGone(final String container) {
sync.deletePath(container + "/");
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d735a9fa/apis/ec2/src/main/java/org/jclouds/ec2/domain/ImageAttribute.java
----------------------------------------------------------------------
diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/domain/ImageAttribute.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/ImageAttribute.java
index cf1e7d4..f951e66 100644
--- a/apis/ec2/src/main/java/org/jclouds/ec2/domain/ImageAttribute.java
+++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/ImageAttribute.java
@@ -16,14 +16,6 @@
*/
package org.jclouds.ec2.domain;
-/**
- *
- * An attribute of an AMI.
- *
- * @see EC2AsyncClient#modifyImageAttribute
- * @see EC2AsyncClient#resetImageAttribute
- * @see EC2AsyncClient#describeImageAttribute
- */
public enum ImageAttribute {
/**
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d735a9fa/apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceState.java
----------------------------------------------------------------------
diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceState.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceState.java
index 2a38809..4718bb8 100644
--- a/apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceState.java
+++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceState.java
@@ -20,14 +20,6 @@ import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.base.CaseFormat;
-/**
- *
- * The current state of the instance..
- *
- * @see EC2AsyncClient#describeInstances
- * @see EC2AsyncClient#runInstances
- * @see EC2AsyncClient#terminateInstances
- */
public enum InstanceState {
/**
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d735a9fa/apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceType.java
----------------------------------------------------------------------
diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceType.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceType.java
index 32fcec5..e97955e 100644
--- a/apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceType.java
+++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceType.java
@@ -16,14 +16,6 @@
*/
package org.jclouds.ec2.domain;
-/**
- *
- * The type of the instance. Description accurate as of 8-15-2009 release.
- *
- * @see EC2AsyncClient#describeInstances
- * @see EC2AsyncClient#runInstances
- * @see EC2AsyncClient#terminateInstances
- */
public class InstanceType {
/**
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d735a9fa/core/src/main/clojure/org/jclouds/core.clj
----------------------------------------------------------------------
diff --git a/core/src/main/clojure/org/jclouds/core.clj b/core/src/main/clojure/org/jclouds/core.clj
index 7c5970a..766f142 100644
--- a/core/src/main/clojure/org/jclouds/core.clj
+++ b/core/src/main/clojure/org/jclouds/core.clj
@@ -31,11 +31,10 @@
:sshj 'org.jclouds.sshj.config.SshjSshClientModule
:enterprise 'org.jclouds.enterprise.config.EnterpriseConfigurationModule
:apachehc 'org.jclouds.http.apachehc.config.ApacheHCHttpCommandExecutorServiceModule
- :ning 'org.jclouds.http.ning.config.NingHttpCommandExecutorServiceModule
+ :okhttp 'org.jclouds.http.okhttp.config.OkHttpCommandExecutorServiceModule
:bouncycastle 'org.jclouds.encryption.bouncycastle.config.BouncyCastleCryptoModule
:joda 'org.jclouds.date.joda.config.JodaDateServiceModule
- :gae 'org.jclouds.gae.config.GoogleAppEngineConfigurationModule
- :gae-async 'org.jclouds.gae.config.AsyncGoogleAppEngineConfigurationModule})
+ :gae 'org.jclouds.gae.config.GoogleAppEngineConfigurationModule})
(defn- instantiate [sym]
(let [loader (.getContextClassLoader (Thread/currentThread))]
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d735a9fa/core/src/main/java/org/jclouds/View.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/jclouds/View.java b/core/src/main/java/org/jclouds/View.java
index 01f9bff..ca71556 100644
--- a/core/src/main/java/org/jclouds/View.java
+++ b/core/src/main/java/org/jclouds/View.java
@@ -45,7 +45,7 @@ public interface View {
*
* ex.
* <pre>
- * RestContext<NovaApi, NovaAsyncApi> backendApi = computeContext.unwrap(NovaApiMetadata.CONTEXT_TOKEN);
+ * ApiContext<NovaApi> backendApi = computeContext.unwrap(new TypeToken<ApiContext<NovaApi>>(){});
* </pre>
* @param type
* the type of the context to be returned. The backend context must
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d735a9fa/core/src/main/java/org/jclouds/apis/ApiMetadata.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/jclouds/apis/ApiMetadata.java b/core/src/main/java/org/jclouds/apis/ApiMetadata.java
index 6d09a9f..96595ab 100644
--- a/core/src/main/java/org/jclouds/apis/ApiMetadata.java
+++ b/core/src/main/java/org/jclouds/apis/ApiMetadata.java
@@ -256,7 +256,7 @@ public interface ApiMetadata {
URI getDocumentation();
/**
- * @return the primary context of this api, for example {@code RestContext<EC2Client, EC2AsyncClient>}
+ * @return the primary context of this api, for example {@code ApiContext<EC2Api>}
*/
TypeToken<? extends Context> getContext();
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d735a9fa/core/src/main/java/org/jclouds/rest/RestContext.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/jclouds/rest/RestContext.java b/core/src/main/java/org/jclouds/rest/RestContext.java
deleted file mode 100644
index 3971bfc..0000000
--- a/core/src/main/java/org/jclouds/rest/RestContext.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.rest;
-
-import org.jclouds.Context;
-import org.jclouds.rest.internal.RestContextImpl;
-
-import com.google.inject.ImplementedBy;
-
-/**
- * Represents an authenticated context to the cloud.
- *
- * <h2>Note</h2> Please issue {@link #close()} when you are finished with this context in order to
- * release resources.
- *
- *
- *
- * @deprecated please use {@link org.jclouds.ContextBuilder#buildApi()} as
- * async interface will be removed in jclouds 1.7.
- */
-@Deprecated
-@ImplementedBy(RestContextImpl.class)
-public interface RestContext<S, A> extends Context {
-
- /**
- * low-level api to the cloud. Threadsafe implementations will return a singleton.
- *
- * @return a connection to the cloud where all methods return {@link Future}s
- * @deprecated please use {@link org.jclouds.ContextBuilder#buildApi()} as
- * async interface will be removed in jclouds 1.7.
- */
- @Deprecated
- A getAsyncApi();
-
- /**
- * reflects a tuned connection to the cloud which calls {@link #getAsyncApi()} with predetermined
- * timeouts.
- *
- * @return a connection to the cloud where all methods block
- */
- S getApi();
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d735a9fa/core/src/main/java/org/jclouds/rest/config/InvocationConfig.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/jclouds/rest/config/InvocationConfig.java b/core/src/main/java/org/jclouds/rest/config/InvocationConfig.java
index b2149bd..fa552ed 100644
--- a/core/src/main/java/org/jclouds/rest/config/InvocationConfig.java
+++ b/core/src/main/java/org/jclouds/rest/config/InvocationConfig.java
@@ -44,7 +44,7 @@ public interface InvocationConfig {
String getCommandName(Invocation invocation);
/**
- * fallback used for Sync or Async commands.
+ * fallback used for commands when exceptions are encountered.
*/
Fallback<?> getFallback(Invocation invocation);
}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d735a9fa/core/src/main/java/org/jclouds/rest/config/ReadAnnotationsAndProperties.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/jclouds/rest/config/ReadAnnotationsAndProperties.java b/core/src/main/java/org/jclouds/rest/config/ReadAnnotationsAndProperties.java
index 9779cbb..8115406 100644
--- a/core/src/main/java/org/jclouds/rest/config/ReadAnnotationsAndProperties.java
+++ b/core/src/main/java/org/jclouds/rest/config/ReadAnnotationsAndProperties.java
@@ -65,8 +65,7 @@ public class ReadAnnotationsAndProperties implements InvocationConfig {
timeoutMillis = timeoutMillis.or(defaultMillis);
} else {
// TODO: remove old logic once Named annotations are on all methods
- String className = invoked.getOwnerType().getRawType().getSimpleName().replace("AsyncClient", "Client")
- .replace("AsyncApi", "Api");
+ String className = invoked.getOwnerType().getRawType().getSimpleName();
timeoutMillis = timeoutMillis.or(fromNullable(timeouts.get(className))).or(defaultMillis);
}
if (timeoutMillis.isPresent())
@@ -81,8 +80,7 @@ public class ReadAnnotationsAndProperties implements InvocationConfig {
return invoked.getAnnotation(Named.class).value();
} else {
// TODO: remove old logic once Named annotations are on all methods
- String className = invoked.getOwnerType().getRawType().getSimpleName().replace("AsyncClient", "Client")
- .replace("AsyncApi", "Api");
+ String className = invoked.getOwnerType().getRawType().getSimpleName();
return className + "." + invoked.getName();
}
}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d735a9fa/core/src/main/java/org/jclouds/rest/internal/InvokeAndCallGetOnFutures.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/jclouds/rest/internal/InvokeAndCallGetOnFutures.java b/core/src/main/java/org/jclouds/rest/internal/InvokeAndCallGetOnFutures.java
deleted file mode 100644
index 8e4acdd..0000000
--- a/core/src/main/java/org/jclouds/rest/internal/InvokeAndCallGetOnFutures.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.rest.internal;
-
-import static com.google.common.base.Throwables.propagate;
-import static com.google.common.util.concurrent.Futures.getUnchecked;
-
-import java.lang.reflect.InvocationTargetException;
-
-import javax.annotation.Resource;
-import javax.inject.Inject;
-
-import org.jclouds.logging.Logger;
-import org.jclouds.reflect.Invocation;
-
-import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Function;
-import com.google.common.reflect.Invokable;
-import com.google.common.util.concurrent.ListenableFuture;
-
-/**
- *
- * @deprecated will be removed in jclouds 1.7, as async interfaces are no longer supported.
- */
-@Deprecated
-public final class InvokeAndCallGetOnFutures<R> implements Function<Invocation, Object> {
-
- @Resource
- private Logger logger = Logger.NULL;
-
- private final Function<Invocation, Invocation> sync2async;
- private final R receiver;
-
- /**
- * @param receiver
- * will have any methods that return {@link ListenableFuture} unwrapped.
- * @return blocking invocation handler
- */
- @Inject
- @VisibleForTesting
- InvokeAndCallGetOnFutures(Function<Invocation, Invocation> sync2async, R receiver) {
- this.sync2async = sync2async;
- this.receiver = receiver;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public Object apply(Invocation in) {
- @SuppressWarnings("rawtypes")
- Invokable target = sync2async.apply(in).getInvokable();
- Object returnVal;
- try {
- returnVal = target.invoke(receiver, in.getArgs().toArray());
- } catch (InvocationTargetException e) {
- throw propagate(e.getCause());
- } catch (IllegalAccessException e) {
- throw new Error("Method became inaccessible: " + toString(), e);
- }
- if (!isFuture(target))
- return returnVal;
- return getUnchecked(ListenableFuture.class.cast(returnVal));
- }
-
- private boolean isFuture(Invokable<?, ?> target) {
- return target.getReturnType().getRawType().isAssignableFrom(ListenableFuture.class);
- }
-
- @Override
- public String toString() {
- return String.format("InvokeAndCallGetOnFutures(%s)", receiver);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d735a9fa/core/src/main/java/org/jclouds/rest/internal/RestContextImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/jclouds/rest/internal/RestContextImpl.java b/core/src/main/java/org/jclouds/rest/internal/RestContextImpl.java
deleted file mode 100644
index 48c8d6e..0000000
--- a/core/src/main/java/org/jclouds/rest/internal/RestContextImpl.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.rest.internal;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import javax.inject.Inject;
-
-import org.jclouds.annotations.Name;
-import org.jclouds.domain.Credentials;
-import org.jclouds.internal.ContextImpl;
-import org.jclouds.lifecycle.Closer;
-import org.jclouds.location.Provider;
-import org.jclouds.providers.ProviderMetadata;
-import org.jclouds.rest.RestContext;
-import org.jclouds.rest.Utils;
-
-import com.google.common.base.Supplier;
-import com.google.inject.Injector;
-import com.google.inject.Key;
-import com.google.inject.Singleton;
-import com.google.inject.TypeLiteral;
-
-/**
- * @deprecated please use {@link org.jclouds.ContextBuilder#buildApi()} as
- * async interface will be removed in jclouds 1.7.
- */
-@Deprecated
-@Singleton
-public class RestContextImpl<S, A> extends ContextImpl implements RestContext<S, A> {
-
- private final A asyncApi;
- private final S syncApi;
-
- @Inject
- protected RestContextImpl(@Name String name, ProviderMetadata providerMetadata,
- @Provider Supplier<Credentials> creds, Utils utils, Closer closer, Injector injector, TypeLiteral<S> syncApi,
- TypeLiteral<A> asyncApi) {
- super(name, providerMetadata, creds, utils, closer);
- checkNotNull(injector, "injector");
- this.asyncApi = injector.getInstance(Key.get(checkNotNull(asyncApi, "asyncApi")));
- this.syncApi = injector.getInstance(Key.get(checkNotNull(syncApi, "syncApi")));
- }
-
- @Override
- public A getAsyncApi() {
- return asyncApi;
- }
-
- @Override
- public S getApi() {
- return syncApi;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d735a9fa/core/src/test/java/org/jclouds/rest/config/ReadAnnotationsAndPropertiesTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/jclouds/rest/config/ReadAnnotationsAndPropertiesTest.java b/core/src/test/java/org/jclouds/rest/config/ReadAnnotationsAndPropertiesTest.java
index 6774449..f764680 100644
--- a/core/src/test/java/org/jclouds/rest/config/ReadAnnotationsAndPropertiesTest.java
+++ b/core/src/test/java/org/jclouds/rest/config/ReadAnnotationsAndPropertiesTest.java
@@ -34,7 +34,6 @@ import org.testng.annotations.Test;
import com.google.common.base.Optional;
import com.google.common.collect.ImmutableList;
-import com.google.common.util.concurrent.ListenableFuture;
import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Injector;
@@ -46,15 +45,9 @@ public class ReadAnnotationsAndPropertiesTest {
public interface ThingApi {
HttpResponse get();
- HttpResponse namedGet();
- }
-
- public interface ThingAsyncApi {
- ListenableFuture<HttpResponse> get();
-
@Named("ns:get")
@Fallback(FalseOnNotFoundOr404.class)
- ListenableFuture<HttpResponse> namedGet();
+ HttpResponse namedGet();
}
private Invocation asyncGet;
@@ -63,14 +56,13 @@ public class ReadAnnotationsAndPropertiesTest {
@BeforeClass
void setupInvocations() throws SecurityException, NoSuchMethodException {
- asyncGet = Invocation.create(method(ThingAsyncApi.class, "get"), ImmutableList.of());
- asyncNamedGet = Invocation.create(method(ThingAsyncApi.class, "namedGet"), ImmutableList.of());
+ asyncGet = Invocation.create(method(ThingApi.class, "get"), ImmutableList.of());
+ asyncNamedGet = Invocation.create(method(ThingApi.class, "namedGet"), ImmutableList.of());
defaultFallback = new NullOnNotFoundOr404();
}
/**
- * this functionality will be removed once Named annotations are on all async
- * classes.
+ * this functionality will be removed once Named annotations are on all classes.
*/
public void testInvocationsSetDefaultTimeoutOnAsyncMethods() throws Exception {
final Properties props = new Properties();
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d735a9fa/core/src/test/java/org/jclouds/rest/functions/PresentWhenApiVersionLexicographicallyAtOrAfterSinceApiVersionTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/jclouds/rest/functions/PresentWhenApiVersionLexicographicallyAtOrAfterSinceApiVersionTest.java b/core/src/test/java/org/jclouds/rest/functions/PresentWhenApiVersionLexicographicallyAtOrAfterSinceApiVersionTest.java
index 927e259..96d2e1e 100644
--- a/core/src/test/java/org/jclouds/rest/functions/PresentWhenApiVersionLexicographicallyAtOrAfterSinceApiVersionTest.java
+++ b/core/src/test/java/org/jclouds/rest/functions/PresentWhenApiVersionLexicographicallyAtOrAfterSinceApiVersionTest.java
@@ -43,30 +43,30 @@ import com.google.common.collect.ImmutableList;
public class PresentWhenApiVersionLexicographicallyAtOrAfterSinceApiVersionTest {
// feature present in base api
- interface KeyPairAsyncApi {
+ interface KeyPairApi {
}
@SinceApiVersion("2010-08-31")
- interface TagAsyncApi {
+ interface TagApi {
}
@SinceApiVersion("2011-01-01")
- interface VpcAsyncApi {
+ interface VpcApi {
}
- interface EC2AsyncApi {
+ interface EC2Api {
@Delegate
- Optional<TagAsyncApi> getTagApiForRegion(String region);
+ Optional<TagApi> getTagApiForRegion(String region);
@Delegate
- Optional<KeyPairAsyncApi> getKeyPairApiForRegion(String region);
+ Optional<KeyPairApi> getKeyPairApiForRegion(String region);
@Delegate
- Optional<VpcAsyncApi> getVpcApiForRegion(String region);
+ Optional<VpcApi> getVpcApiForRegion(String region);
}
@@ -148,21 +148,21 @@ public class PresentWhenApiVersionLexicographicallyAtOrAfterSinceApiVersionTest
}
InvocationSuccess getFloatingIPApi() {
- return getApi("Tag", TagAsyncApi.class);
+ return getApi("Tag", TagApi.class);
}
InvocationSuccess getKeyPairApi() {
- return getApi("KeyPair", KeyPairAsyncApi.class);
+ return getApi("KeyPair", KeyPairApi.class);
}
InvocationSuccess getVpcApi() {
- return getApi("Vpc", VpcAsyncApi.class);
+ return getApi("Vpc", VpcApi.class);
}
InvocationSuccess getApi(String name, Class<?> target) {
try {
return InvocationSuccess.create(
- Invocation.create(method(EC2AsyncApi.class, "get" + name + "ApiForRegion", String.class),
+ Invocation.create(method(EC2Api.class, "get" + name + "ApiForRegion", String.class),
ImmutableList.<Object> of("region")), "present");
} catch (Exception e) {
throw propagate(e);
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d735a9fa/drivers/gae/src/test/java/org/jclouds/gae/GaeHttpCommandExecutorServiceIntegrationTest.java
----------------------------------------------------------------------
diff --git a/drivers/gae/src/test/java/org/jclouds/gae/GaeHttpCommandExecutorServiceIntegrationTest.java b/drivers/gae/src/test/java/org/jclouds/gae/GaeHttpCommandExecutorServiceIntegrationTest.java
index d7e30bf..c68451f 100644
--- a/drivers/gae/src/test/java/org/jclouds/gae/GaeHttpCommandExecutorServiceIntegrationTest.java
+++ b/drivers/gae/src/test/java/org/jclouds/gae/GaeHttpCommandExecutorServiceIntegrationTest.java
@@ -19,19 +19,14 @@ package org.jclouds.gae;
import java.io.IOException;
import java.util.Properties;
-import org.jclouds.concurrent.SingleThreaded;
-import org.jclouds.concurrent.config.ConfiguresExecutorService;
import org.jclouds.gae.config.GoogleAppEngineConfigurationModule;
import org.jclouds.http.BaseHttpCommandExecutorServiceIntegrationTest;
-import org.jclouds.http.HttpCommandExecutorService;
-import org.jclouds.http.config.ConfiguresHttpCommandExecutorService;
import org.testng.SkipException;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import com.google.appengine.tools.development.testing.LocalServiceTestHelper;
import com.google.appengine.tools.development.testing.LocalURLFetchServiceTestConfig;
-import com.google.inject.Injector;
import com.google.inject.Module;
/**
@@ -69,27 +64,10 @@ public class GaeHttpCommandExecutorServiceIntegrationTest extends BaseHttpComman
protected Module createConnectionModule() {
setupApiProxy();
- return new AsyncGoogleAppEngineConfigurationModule();
- }
-
- @ConfiguresHttpCommandExecutorService
- @ConfiguresExecutorService
- @SingleThreaded
- public class AsyncGoogleAppEngineConfigurationModule extends GoogleAppEngineConfigurationModule {
-
- public AsyncGoogleAppEngineConfigurationModule() {
- super();
- }
-
- protected HttpCommandExecutorService providerHttpCommandExecutorService(Injector injector) {
- return injector.getInstance(GaeHttpCommandExecutorService.class);
- }
-
+ return new GoogleAppEngineConfigurationModule();
}
@Override
protected void addOverrideProperties(Properties props) {
-
}
-
}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d735a9fa/providers/aws-s3/src/test/java/org/jclouds/aws/s3/AWSS3ClientTest.java
----------------------------------------------------------------------
diff --git a/providers/aws-s3/src/test/java/org/jclouds/aws/s3/AWSS3ClientTest.java b/providers/aws-s3/src/test/java/org/jclouds/aws/s3/AWSS3ClientTest.java
index 783cc43..c68b763 100644
--- a/providers/aws-s3/src/test/java/org/jclouds/aws/s3/AWSS3ClientTest.java
+++ b/providers/aws-s3/src/test/java/org/jclouds/aws/s3/AWSS3ClientTest.java
@@ -77,7 +77,7 @@ public class AWSS3ClientTest extends S3ClientTest<AWSS3Client> {
@Override
public void testCopyObjectInvalidName() throws ArrayIndexOutOfBoundsException, SecurityException,
IllegalArgumentException, NoSuchMethodException, IOException {
- // For AWS S3, S3AsyncClientTest#testCopyObjectInvalidName() will not throw an exception
+ // For AWS S3, S3ClientTest#testCopyObjectInvalidName() will not throw an exception
Invokable<?, ?> method = method(AWSS3Client.class, "copyObject", String.class, String.class, String.class,
String.class,
CopyObjectOptions[].class);
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d735a9fa/providers/glesys/src/test/java/org/jclouds/glesys/features/EmailAccountApiExpectTest.java
----------------------------------------------------------------------
diff --git a/providers/glesys/src/test/java/org/jclouds/glesys/features/EmailAccountApiExpectTest.java b/providers/glesys/src/test/java/org/jclouds/glesys/features/EmailAccountApiExpectTest.java
index db7d574..de39e03 100644
--- a/providers/glesys/src/test/java/org/jclouds/glesys/features/EmailAccountApiExpectTest.java
+++ b/providers/glesys/src/test/java/org/jclouds/glesys/features/EmailAccountApiExpectTest.java
@@ -44,7 +44,7 @@ import com.google.common.collect.Iterables;
/**
* Tests annotation parsing of {@code EmailAccountApi}
*/
-@Test(groups = "unit", testName = "EmailAccountAsyncApiTest")
+@Test(groups = "unit", testName = "EmailAccountApiExpectTest")
public class EmailAccountApiExpectTest extends BaseGleSYSApiExpectTest {
public void testListWhenResponseIs2xx() throws Exception {
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d735a9fa/providers/softlayer/src/test/java/org/jclouds/softlayer/features/DatacenterApiExpectTest.java
----------------------------------------------------------------------
diff --git a/providers/softlayer/src/test/java/org/jclouds/softlayer/features/DatacenterApiExpectTest.java b/providers/softlayer/src/test/java/org/jclouds/softlayer/features/DatacenterApiExpectTest.java
index 2317a3a..7a7cfad 100644
--- a/providers/softlayer/src/test/java/org/jclouds/softlayer/features/DatacenterApiExpectTest.java
+++ b/providers/softlayer/src/test/java/org/jclouds/softlayer/features/DatacenterApiExpectTest.java
@@ -28,10 +28,7 @@ import org.testng.annotations.Test;
import com.google.common.collect.Iterables;
-/**
- * Tests annotation parsing of {@code DatacenterAsyncClient}
- */
-@Test(groups = "unit")
+@Test(groups = "unit", testName = "DatacenterApiExpectTest")
public class DatacenterApiExpectTest extends BaseSoftLayerApiExpectTest {
public void testListDatacentersWhenResponseIs2xx() {
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d735a9fa/providers/softlayer/src/test/java/org/jclouds/softlayer/features/SoftwareDescriptionApiExpectTest.java
----------------------------------------------------------------------
diff --git a/providers/softlayer/src/test/java/org/jclouds/softlayer/features/SoftwareDescriptionApiExpectTest.java b/providers/softlayer/src/test/java/org/jclouds/softlayer/features/SoftwareDescriptionApiExpectTest.java
index c8286c2..524d703 100644
--- a/providers/softlayer/src/test/java/org/jclouds/softlayer/features/SoftwareDescriptionApiExpectTest.java
+++ b/providers/softlayer/src/test/java/org/jclouds/softlayer/features/SoftwareDescriptionApiExpectTest.java
@@ -26,10 +26,7 @@ import org.testng.annotations.Test;
import com.google.common.collect.Iterables;
-/**
- * Tests annotation parsing of {@code DatacenterAsyncClient}
- */
-@Test(groups = "unit")
+@Test(groups = "unit", testName = "SoftwareDescriptionApiExpectTest")
public class SoftwareDescriptionApiExpectTest extends BaseSoftLayerApiExpectTest {
public void testGetAllObjectsWhenResponseIs2xx() {