From 57ebe8b3018b83b38af091f191ce2f8e7e5f081c Mon Sep 17 00:00:00 2001 From: Aleksandr Nesterov Date: Wed, 17 Aug 2022 13:39:12 +0200 Subject: [PATCH] [Gradle Release Plugin] - pre tag commit: 'v1.5.9'. --- gradle.properties | 2 +- .../mobius/MobiusLoopControllerTest.java | 14 ++++----- .../mobius/MobiusLoopDisposalBehavior.java | 29 ++++++++++--------- 3 files changed, 21 insertions(+), 24 deletions(-) diff --git a/gradle.properties b/gradle.properties index d43f8e7..1ad7f2c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=1.5.9-SNAPSHOT +version=1.5.9 GROUP=com.spotify.mobius diff --git a/mobius-core/src/test/java/com/spotify/mobius/MobiusLoopControllerTest.java b/mobius-core/src/test/java/com/spotify/mobius/MobiusLoopControllerTest.java index d5256d6..ffc3715 100644 --- a/mobius-core/src/test/java/com/spotify/mobius/MobiusLoopControllerTest.java +++ b/mobius-core/src/test/java/com/spotify/mobius/MobiusLoopControllerTest.java @@ -41,15 +41,10 @@ import com.spotify.mobius.runners.ImmediateWorkRunner; import com.spotify.mobius.runners.WorkRunner; import com.spotify.mobius.runners.WorkRunners; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; -import java.util.concurrent.locks.Lock; -import java.util.concurrent.locks.ReentrantLock; -import javax.annotation.Nonnull; import org.junit.Before; import org.junit.Test; import org.mockito.InOrder; @@ -638,10 +633,11 @@ private static class KnownThreadWorkRunner implements WorkRunner { @Override @SuppressWarnings("FutureReturnValueIgnored") public void post(final Runnable runnable) { - delegate.post(() -> { - workerThread = Thread.currentThread(); - runnable.run(); - }); + delegate.post( + () -> { + workerThread = Thread.currentThread(); + runnable.run(); + }); } @Override diff --git a/mobius-core/src/test/java/com/spotify/mobius/MobiusLoopDisposalBehavior.java b/mobius-core/src/test/java/com/spotify/mobius/MobiusLoopDisposalBehavior.java index fb2c7c8..f97c75c 100644 --- a/mobius-core/src/test/java/com/spotify/mobius/MobiusLoopDisposalBehavior.java +++ b/mobius-core/src/test/java/com/spotify/mobius/MobiusLoopDisposalBehavior.java @@ -293,21 +293,22 @@ public WorkRunner get() { return WorkRunners.from(Executors.newFixedThreadPool(4)); } }); - final Thread thread = new Thread( - new Runnable() { - @Override - public void run() { - for (int i = 0; i < 100; i++) { - mobiusLoop = builder.startFrom("foo"); - try { - Thread.sleep(random.nextInt(10)); - } catch (InterruptedException e) { - throw new RuntimeException(e); + final Thread thread = + new Thread( + new Runnable() { + @Override + public void run() { + for (int i = 0; i < 100; i++) { + mobiusLoop = builder.startFrom("foo"); + try { + Thread.sleep(random.nextInt(10)); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + mobiusLoop.dispose(); + } } - mobiusLoop.dispose(); - } - } - }); + }); thread.start(); for (int i = 0; i < 1000; i++) {