aboutsummaryrefslogtreecommitdiffstats
path: root/jdisc_core
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@yahoo-inc.com>2016-07-04 16:22:59 +0200
committerJon Bratseth <bratseth@yahoo-inc.com>2016-07-04 16:22:59 +0200
commit8dc4851d9a6fdc495d78a0bbc7fd34d4fdab4317 (patch)
tree36bfe2529ff92975752063b2ee178567ac6f9b0c /jdisc_core
parent1758e64338c4076c222e6c04b8c481f33bb462fc (diff)
sameThreadExecutor -> directExecutor
The former is deprecated and will be removed in "August 2016"
Diffstat (limited to 'jdisc_core')
-rw-r--r--jdisc_core/src/test/java/com/yahoo/jdisc/handler/FastContentWriterTestCase.java2
-rw-r--r--jdisc_core/src/test/java/com/yahoo/jdisc/handler/FutureCompletionTestCase.java4
-rw-r--r--jdisc_core/src/test/java/com/yahoo/jdisc/handler/FutureConjunctionTestCase.java6
-rw-r--r--jdisc_core/src/test/java/com/yahoo/jdisc/handler/FutureResponseTestCase.java2
-rw-r--r--jdisc_core/src/test/java/com/yahoo/jdisc/handler/RequestDispatchTestCase.java2
-rw-r--r--jdisc_core/src/test/java/com/yahoo/jdisc/handler/ResponseDispatchTestCase.java2
6 files changed, 9 insertions, 9 deletions
diff --git a/jdisc_core/src/test/java/com/yahoo/jdisc/handler/FastContentWriterTestCase.java b/jdisc_core/src/test/java/com/yahoo/jdisc/handler/FastContentWriterTestCase.java
index e3bedaf5c2a..2c2b19c6f23 100644
--- a/jdisc_core/src/test/java/com/yahoo/jdisc/handler/FastContentWriterTestCase.java
+++ b/jdisc_core/src/test/java/com/yahoo/jdisc/handler/FastContentWriterTestCase.java
@@ -188,7 +188,7 @@ public class FastContentWriterTestCase {
ReadableContentChannel buf = new ReadableContentChannel();
FastContentWriter out = new FastContentWriter(buf);
RunnableLatch listener = new RunnableLatch();
- out.addListener(listener, MoreExecutors.sameThreadExecutor());
+ out.addListener(listener, MoreExecutors.directExecutor());
out.write(new byte[] { 6, 9 });
assertFalse(listener.await(100, TimeUnit.MILLISECONDS));
diff --git a/jdisc_core/src/test/java/com/yahoo/jdisc/handler/FutureCompletionTestCase.java b/jdisc_core/src/test/java/com/yahoo/jdisc/handler/FutureCompletionTestCase.java
index e886d663a72..d282c3d89f4 100644
--- a/jdisc_core/src/test/java/com/yahoo/jdisc/handler/FutureCompletionTestCase.java
+++ b/jdisc_core/src/test/java/com/yahoo/jdisc/handler/FutureCompletionTestCase.java
@@ -91,14 +91,14 @@ public class FutureCompletionTestCase {
public void requireThatCompletionCanBeListenedTo() throws InterruptedException {
FutureCompletion completion = new FutureCompletion();
RunnableLatch listener = new RunnableLatch();
- completion.addListener(listener, MoreExecutors.sameThreadExecutor());
+ completion.addListener(listener, MoreExecutors.directExecutor());
assertFalse(listener.await(100, TimeUnit.MILLISECONDS));
completion.completed();
assertTrue(listener.await(600, TimeUnit.SECONDS));
completion = new FutureCompletion();
listener = new RunnableLatch();
- completion.addListener(listener, MoreExecutors.sameThreadExecutor());
+ completion.addListener(listener, MoreExecutors.directExecutor());
assertFalse(listener.await(100, TimeUnit.MILLISECONDS));
completion.failed(new Throwable());
assertTrue(listener.await(600, TimeUnit.SECONDS));
diff --git a/jdisc_core/src/test/java/com/yahoo/jdisc/handler/FutureConjunctionTestCase.java b/jdisc_core/src/test/java/com/yahoo/jdisc/handler/FutureConjunctionTestCase.java
index 3916eb7ffd6..e0c94ee21e2 100644
--- a/jdisc_core/src/test/java/com/yahoo/jdisc/handler/FutureConjunctionTestCase.java
+++ b/jdisc_core/src/test/java/com/yahoo/jdisc/handler/FutureConjunctionTestCase.java
@@ -118,7 +118,7 @@ public class FutureConjunctionTestCase {
public void requireThatConjunctionCanBeListenedTo() throws InterruptedException {
FutureConjunction conjunction = new FutureConjunction();
RunnableLatch listener = new RunnableLatch();
- conjunction.addListener(listener, MoreExecutors.sameThreadExecutor());
+ conjunction.addListener(listener, MoreExecutors.directExecutor());
assertTrue(listener.await(600, TimeUnit.SECONDS));
conjunction = new FutureConjunction();
@@ -127,7 +127,7 @@ public class FutureConjunctionTestCase {
FutureBoolean bar = new FutureBoolean();
conjunction.addOperand(bar);
listener = new RunnableLatch();
- conjunction.addListener(listener, MoreExecutors.sameThreadExecutor());
+ conjunction.addListener(listener, MoreExecutors.directExecutor());
assertFalse(listener.await(100, TimeUnit.MILLISECONDS));
foo.set(true);
assertFalse(listener.await(100, TimeUnit.MILLISECONDS));
@@ -140,7 +140,7 @@ public class FutureConjunctionTestCase {
bar = new FutureBoolean();
conjunction.addOperand(bar);
listener = new RunnableLatch();
- conjunction.addListener(listener, MoreExecutors.sameThreadExecutor());
+ conjunction.addListener(listener, MoreExecutors.directExecutor());
assertFalse(listener.await(100, TimeUnit.MILLISECONDS));
bar.set(true);
assertFalse(listener.await(100, TimeUnit.MILLISECONDS));
diff --git a/jdisc_core/src/test/java/com/yahoo/jdisc/handler/FutureResponseTestCase.java b/jdisc_core/src/test/java/com/yahoo/jdisc/handler/FutureResponseTestCase.java
index 925c09f763d..9cc453faef1 100644
--- a/jdisc_core/src/test/java/com/yahoo/jdisc/handler/FutureResponseTestCase.java
+++ b/jdisc_core/src/test/java/com/yahoo/jdisc/handler/FutureResponseTestCase.java
@@ -73,7 +73,7 @@ public class FutureResponseTestCase {
public void requireThatResponseCanBeListenedTo() throws InterruptedException {
FutureResponse response = new FutureResponse();
RunnableLatch listener = new RunnableLatch();
- response.addListener(listener, MoreExecutors.sameThreadExecutor());
+ response.addListener(listener, MoreExecutors.directExecutor());
assertFalse(listener.await(100, TimeUnit.MILLISECONDS));
response.handleResponse(new Response(Response.Status.OK));
assertTrue(listener.await(600, TimeUnit.SECONDS));
diff --git a/jdisc_core/src/test/java/com/yahoo/jdisc/handler/RequestDispatchTestCase.java b/jdisc_core/src/test/java/com/yahoo/jdisc/handler/RequestDispatchTestCase.java
index f13473a1660..dbce93c8f98 100644
--- a/jdisc_core/src/test/java/com/yahoo/jdisc/handler/RequestDispatchTestCase.java
+++ b/jdisc_core/src/test/java/com/yahoo/jdisc/handler/RequestDispatchTestCase.java
@@ -218,7 +218,7 @@ public class RequestDispatchTestCase {
protected Request newRequest() {
return new Request(driver, URI.create("http://localhost/"));
}
- }.dispatch().addListener(listener, MoreExecutors.sameThreadExecutor());
+ }.dispatch().addListener(listener, MoreExecutors.directExecutor());
assertFalse(listener.await(100, TimeUnit.MILLISECONDS));
ContentChannel responseContent = ResponseDispatch.newInstance(Response.Status.OK)
.connect(requestHandler.responseHandler);
diff --git a/jdisc_core/src/test/java/com/yahoo/jdisc/handler/ResponseDispatchTestCase.java b/jdisc_core/src/test/java/com/yahoo/jdisc/handler/ResponseDispatchTestCase.java
index 92fc0f90c07..0dd1e7657fe 100644
--- a/jdisc_core/src/test/java/com/yahoo/jdisc/handler/ResponseDispatchTestCase.java
+++ b/jdisc_core/src/test/java/com/yahoo/jdisc/handler/ResponseDispatchTestCase.java
@@ -179,7 +179,7 @@ public class ResponseDispatchTestCase {
ReadableContentChannel responseContent = new ReadableContentChannel();
ResponseDispatch.newInstance(6, ByteBuffer.allocate(9))
.dispatch(new MyResponseHandler(responseContent))
- .addListener(listener, MoreExecutors.sameThreadExecutor());
+ .addListener(listener, MoreExecutors.directExecutor());
assertFalse(listener.await(100, TimeUnit.MILLISECONDS));
assertNotNull(responseContent.read());
assertFalse(listener.await(100, TimeUnit.MILLISECONDS));