switched off performance test and removed unused class

This commit is contained in:
Adrian Cole 2010-07-28 21:22:10 -07:00
parent 8c0e387b3e
commit 909fc0d79a
2 changed files with 5 additions and 40 deletions

View File

@ -1,39 +0,0 @@
/**
*
* Copyright (C) 2009 Cloud Conscious, LLC. <info@cloudconscious.com>
*
* ====================================================================
* Licensed 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.concurrent;
import javax.annotation.Nullable;
import org.jclouds.functions.ExceptionToValueOrPropagate;
import com.google.common.util.concurrent.ListenableFuture;
/**
* Matches on a particular exception and converts the response to null.
*
* @author Adrian Cole
*/
public class ConvertFutureExceptionToValue<T> extends FutureExceptionParser<T> {
public <E extends Exception> ConvertFutureExceptionToValue(ListenableFuture<T> delegate,
Class<E> exceptionClass, @Nullable T value) {
super(delegate, new ExceptionToValueOrPropagate<E, T>(exceptionClass, value));
}
}

View File

@ -36,10 +36,11 @@ import org.testng.annotations.Test;
* *
* @author Adrian Cole * @author Adrian Cole
*/ */
@Test(groups = "performance", sequential = true, testName = "concurrent.ConcurrentUtilsTest") @Test(enabled = false, groups = "performance", sequential = true, testName = "concurrent.ConcurrentUtilsTest")
public class FuturesComposePerformanceTest { public class FuturesComposePerformanceTest {
ExecutorService callableExecutor = newCachedThreadPool(); ExecutorService callableExecutor = newCachedThreadPool();
@Test(enabled = false)
public void test1() throws InterruptedException, ExecutionException { public void test1() throws InterruptedException, ExecutionException {
long expectedMax = CALLABLE_DURATION + LISTENER_DURATION; long expectedMax = CALLABLE_DURATION + LISTENER_DURATION;
long expectedMin = CALLABLE_DURATION + LISTENER_DURATION; long expectedMin = CALLABLE_DURATION + LISTENER_DURATION;
@ -51,6 +52,7 @@ public class FuturesComposePerformanceTest {
checkThresholds(expectedMin, expectedMax, expectedOverhead, callableExecutor, chainExecutor, listenerExecutor); checkThresholds(expectedMin, expectedMax, expectedOverhead, callableExecutor, chainExecutor, listenerExecutor);
} }
@Test(enabled = false)
public void test2() throws InterruptedException, ExecutionException { public void test2() throws InterruptedException, ExecutionException {
long expectedMax = CALLABLE_DURATION + LISTENER_DURATION; long expectedMax = CALLABLE_DURATION + LISTENER_DURATION;
long expectedMin = CALLABLE_DURATION + LISTENER_DURATION; long expectedMin = CALLABLE_DURATION + LISTENER_DURATION;
@ -62,6 +64,7 @@ public class FuturesComposePerformanceTest {
checkThresholds(expectedMin, expectedMax, expectedOverhead, callableExecutor, chainExecutor, listenerExecutor); checkThresholds(expectedMin, expectedMax, expectedOverhead, callableExecutor, chainExecutor, listenerExecutor);
} }
@Test(enabled = false)
public void test3() throws InterruptedException, ExecutionException { public void test3() throws InterruptedException, ExecutionException {
long expectedMax = (CALLABLE_DURATION * COUNT) + LISTENER_DURATION; long expectedMax = (CALLABLE_DURATION * COUNT) + LISTENER_DURATION;
long expectedMin = CALLABLE_DURATION + LISTENER_DURATION; long expectedMin = CALLABLE_DURATION + LISTENER_DURATION;
@ -73,6 +76,7 @@ public class FuturesComposePerformanceTest {
checkThresholds(expectedMin, expectedMax, expectedOverhead, callableExecutor, chainExecutor, listenerExecutor); checkThresholds(expectedMin, expectedMax, expectedOverhead, callableExecutor, chainExecutor, listenerExecutor);
} }
@Test(enabled = false)
public void test4() throws InterruptedException, ExecutionException { public void test4() throws InterruptedException, ExecutionException {
long expectedMax = (CALLABLE_DURATION * COUNT) + (LISTENER_DURATION * COUNT); long expectedMax = (CALLABLE_DURATION * COUNT) + (LISTENER_DURATION * COUNT);