@Beta @GwtIncompatible public abstract class AbstractCheckedFutureTest extends AbstractListenableFutureTest
CheckedFuture.checkedGet() and
CheckedFuture.checkedGet(long, TimeUnit) methods work correctly.future, latch| Constructor and Description |
|---|
AbstractCheckedFutureTest() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
checkCancelledException(Exception e)
Checks that the exception is the correct type of cancellation exception.
|
protected abstract void |
checkExecutionException(Exception e)
Checks that the exception is the correct type of execution exception.
|
protected abstract void |
checkInterruptedException(Exception e)
Checks that the exception is the correct type of interruption exception.
|
protected abstract <V> com.google.common.util.concurrent.CheckedFuture<V,?> |
createCheckedFuture(V value,
Exception except,
CountDownLatch waitOn)
More specific type for the create method.
|
protected <V> com.google.common.util.concurrent.ListenableFuture<V> |
createListenableFuture(V value,
Exception except,
CountDownLatch waitOn)
Constructs a listenable future with a value available after the latch
has counted down.
|
void |
testCheckedGetThrowsApplicationExceptionOnCancellation()
Tests that the
CheckedFuture.checkedGet() method throws the correct
type of cancellation exception when it is cancelled. |
void |
testCheckedGetThrowsApplicationExceptionOnError() |
void |
testCheckedGetThrowsApplicationExceptionOnInterruption() |
setUp, tearDown, testAllListenersCompleteSuccessfully, testCanceledFutureThrowsCancellation, testGetBlocksUntilValueAvailable, testListenersNotifiedOnError, testTimeoutOnGetWorksCorrectlycountTestCases, createResult, getName, run, run, runBare, runTest, setName, toStringassertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, formatprotected abstract <V> com.google.common.util.concurrent.CheckedFuture<V,?> createCheckedFuture(V value,
Exception except,
CountDownLatch waitOn)
protected abstract void checkCancelledException(Exception e)
protected abstract void checkExecutionException(Exception e)
protected abstract void checkInterruptedException(Exception e)
protected <V> com.google.common.util.concurrent.ListenableFuture<V> createListenableFuture(V value,
Exception except,
CountDownLatch waitOn)
AbstractListenableFutureTestcreateListenableFuture in class AbstractListenableFutureTestpublic void testCheckedGetThrowsApplicationExceptionOnCancellation()
CheckedFuture.checkedGet() method throws the correct
type of cancellation exception when it is cancelled.public void testCheckedGetThrowsApplicationExceptionOnInterruption()
throws InterruptedException
InterruptedExceptionpublic void testCheckedGetThrowsApplicationExceptionOnError()
Copyright © 2010–2017. All rights reserved.