Class AbstractListenableFutureTest

java.lang.Object
junit.framework.Assert
junit.framework.TestCase
com.google.common.util.concurrent.testing.AbstractListenableFutureTest
All Implemented Interfaces:
junit.framework.Test

@GwtIncompatible public abstract class AbstractListenableFutureTest extends junit.framework.TestCase
Abstract test case parent for anything implementing ListenableFuture. Tests the two get methods and the addListener method.
Since:
10.0
Author:
Sven Mawson
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected com.google.common.util.concurrent.ListenableFuture<Boolean>
     
    protected CountDownLatch
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract <V> com.google.common.util.concurrent.ListenableFuture<V>
    createListenableFuture(V value, @Nullable Exception except, CountDownLatch waitOn)
    Constructs a listenable future with a value available after the latch has counted down.
    protected void
     
    protected void
     
    void
    Tests that all listeners complete, even if they were added before or after the future was finishing.
    void
    Tests that a canceled future throws a cancellation exception.
    void
    Tests that the Future.get() method blocks until a value is available.
    void
     
    void
    Tests that the Future.get(long, TimeUnit) method times out correctly.

    Methods inherited from class junit.framework.TestCase

    assertEquals, 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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait