aboutsummaryrefslogtreecommitdiff
path: root/guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java
diff options
context:
space:
mode:
Diffstat (limited to 'guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java')
-rw-r--r--guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java b/guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java
index fc3ed21f1..8c38f2c44 100644
--- a/guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java
+++ b/guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java
@@ -19,21 +19,22 @@ package com.google.common.util.concurrent.testing;
import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
import com.google.common.annotations.Beta;
-import com.google.common.annotations.GwtIncompatible;
import com.google.common.util.concurrent.ListenableFuture;
+
+import junit.framework.Assert;
+
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
-import junit.framework.Assert;
/**
- * A simple mock implementation of {@code Runnable} that can be used for testing ListenableFutures.
+ * A simple mock implementation of {@code Runnable} that can be used for
+ * testing ListenableFutures.
*
* @author Nishant Thakkar
* @since 10.0
*/
@Beta
-@GwtIncompatible
public class MockFutureListener implements Runnable {
private final CountDownLatch countDownLatch;
private final ListenableFuture<?> future;
@@ -51,11 +52,10 @@ public class MockFutureListener implements Runnable {
}
/**
- * Verify that the listener completes in a reasonable amount of time, and Asserts that the future
- * returns the expected data.
- *
- * @throws Throwable if the listener isn't called or if it resulted in a throwable or if the
- * result doesn't match the expected value.
+ * Verify that the listener completes in a reasonable amount of time, and
+ * Asserts that the future returns the expected data.
+ * @throws Throwable if the listener isn't called or if it resulted in a
+ * throwable or if the result doesn't match the expected value.
*/
public void assertSuccess(Object expectedData) throws Throwable {
// Verify that the listener executed in a reasonable amount of time.
@@ -69,9 +69,9 @@ public class MockFutureListener implements Runnable {
}
/**
- * Verify that the listener completes in a reasonable amount of time, and Asserts that the future
- * throws an {@code ExecutableException} and that the cause of the {@code ExecutableException} is
- * {@code expectedCause}.
+ * Verify that the listener completes in a reasonable amount of time, and
+ * Asserts that the future throws an {@code ExecutableException} and that the
+ * cause of the {@code ExecutableException} is {@code expectedCause}.
*/
public void assertException(Throwable expectedCause) throws Exception {
// Verify that the listener executed in a reasonable amount of time.