File tree 1 file changed +3
-3
lines changed
src/test/scala/scala/async/run/futures
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,14 @@ class FutureSpec {
61
61
}
62
62
63
63
f2 foreach { _ => throw new ThrowableTest (" dispatcher foreach" ) }
64
- f2 onSuccess { case _ => throw new ThrowableTest (" dispatcher receive" ) }
64
+ f2 onComplete { case Success (_) => throw new ThrowableTest (" dispatcher receive" ) }
65
65
66
66
latch.open()
67
67
68
68
Await .result(f2, defaultTimeout) mustBe (" success" )
69
69
70
70
f2 foreach { _ => throw new ThrowableTest (" current thread foreach" ) }
71
- f2 onSuccess { case _ => throw new ThrowableTest (" current thread receive" ) }
71
+ f2 onComplete { case Success (_) => throw new ThrowableTest (" current thread receive" ) }
72
72
73
73
Await .result(f3, defaultTimeout) mustBe (" SUCCESS" )
74
74
@@ -251,7 +251,7 @@ class FutureSpec {
251
251
val result = Future .find[Int ](futures)(_ == 3 )
252
252
Await .result(result, defaultTimeout) mustBe (Some (3 ))
253
253
254
- val notFound = Future .find[Int ](futures.iterator )(_ == 11 )
254
+ val notFound = Future .find[Int ](futures)(_ == 11 )
255
255
Await .result(notFound, defaultTimeout) mustBe (None )
256
256
}
257
257
You can’t perform that action at this time.
0 commit comments