X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FSoneInserterTest.java;h=31d7b6bec10bbe660ba41f8a81536bb7351db92e;hp=94eabb0a0c877a940b4b6a47119d9d6b5d4bc8eb;hb=b9fc06f5bf20b1c0d5e7c5e9b49e87581a843ee7;hpb=7e43bed09912f401dc53be9b998ebd1072656ffe diff --git a/src/test/java/net/pterodactylus/sone/core/SoneInserterTest.java b/src/test/java/net/pterodactylus/sone/core/SoneInserterTest.java index 94eabb0..31d7b6b 100644 --- a/src/test/java/net/pterodactylus/sone/core/SoneInserterTest.java +++ b/src/test/java/net/pterodactylus/sone/core/SoneInserterTest.java @@ -1,7 +1,7 @@ package net.pterodactylus.sone.core; import static com.google.common.io.ByteStreams.toByteArray; -import static com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor; +import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static java.lang.System.currentTimeMillis; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsString; @@ -64,7 +64,7 @@ public class SoneInserterTest { @Test public void insertionDelayIsForwardedToSoneInserter() { - EventBus eventBus = new AsyncEventBus(sameThreadExecutor()); + EventBus eventBus = new AsyncEventBus(directExecutor()); eventBus.register(new SoneInserter(core, eventBus, freenetInterface, "SoneId")); eventBus.post(new InsertionDelayChangedEvent(15)); assertThat(SoneInserter.getInsertionDelay().get(), is(15));