File tree 3 files changed +21
-24
lines changed
mobius-core/src/test/java/com/spotify/mobius
3 files changed +21
-24
lines changed Original file line number Diff line number Diff line change 1
- version =1.5.9-SNAPSHOT
1
+ version =1.5.9
2
2
3
3
GROUP =com.spotify.mobius
4
4
Original file line number Diff line number Diff line change 41
41
import com .spotify .mobius .runners .ImmediateWorkRunner ;
42
42
import com .spotify .mobius .runners .WorkRunner ;
43
43
import com .spotify .mobius .runners .WorkRunners ;
44
- import java .util .concurrent .ExecutorService ;
45
- import java .util .concurrent .Executors ;
46
44
import java .util .concurrent .Semaphore ;
47
45
import java .util .concurrent .TimeUnit ;
48
46
import java .util .concurrent .atomic .AtomicBoolean ;
49
47
import java .util .concurrent .atomic .AtomicReference ;
50
- import java .util .concurrent .locks .Lock ;
51
- import java .util .concurrent .locks .ReentrantLock ;
52
- import javax .annotation .Nonnull ;
53
48
import org .junit .Before ;
54
49
import org .junit .Test ;
55
50
import org .mockito .InOrder ;
@@ -638,10 +633,11 @@ private static class KnownThreadWorkRunner implements WorkRunner {
638
633
@ Override
639
634
@ SuppressWarnings ("FutureReturnValueIgnored" )
640
635
public void post (final Runnable runnable ) {
641
- delegate .post (() -> {
642
- workerThread = Thread .currentThread ();
643
- runnable .run ();
644
- });
636
+ delegate .post (
637
+ () -> {
638
+ workerThread = Thread .currentThread ();
639
+ runnable .run ();
640
+ });
645
641
}
646
642
647
643
@ Override
Original file line number Diff line number Diff line change @@ -293,21 +293,22 @@ public WorkRunner get() {
293
293
return WorkRunners .from (Executors .newFixedThreadPool (4 ));
294
294
}
295
295
});
296
- final Thread thread = new Thread (
297
- new Runnable () {
298
- @ Override
299
- public void run () {
300
- for (int i = 0 ; i < 100 ; i ++) {
301
- mobiusLoop = builder .startFrom ("foo" );
302
- try {
303
- Thread .sleep (random .nextInt (10 ));
304
- } catch (InterruptedException e ) {
305
- throw new RuntimeException (e );
296
+ final Thread thread =
297
+ new Thread (
298
+ new Runnable () {
299
+ @ Override
300
+ public void run () {
301
+ for (int i = 0 ; i < 100 ; i ++) {
302
+ mobiusLoop = builder .startFrom ("foo" );
303
+ try {
304
+ Thread .sleep (random .nextInt (10 ));
305
+ } catch (InterruptedException e ) {
306
+ throw new RuntimeException (e );
307
+ }
308
+ mobiusLoop .dispose ();
309
+ }
306
310
}
307
- mobiusLoop .dispose ();
308
- }
309
- }
310
- });
311
+ });
311
312
thread .start ();
312
313
313
314
for (int i = 0 ; i < 1000 ; i ++) {
You can’t perform that action at this time.
0 commit comments