File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/test/scala/scala/async/run/futures Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,14 @@ class FutureSpec {
6161 }
6262
6363 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" ) }
6565
6666 latch.open()
6767
6868 Await .result(f2, defaultTimeout) mustBe (" success" )
6969
7070 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" ) }
7272
7373 Await .result(f3, defaultTimeout) mustBe (" SUCCESS" )
7474
@@ -251,7 +251,7 @@ class FutureSpec {
251251 val result = Future .find[Int ](futures)(_ == 3 )
252252 Await .result(result, defaultTimeout) mustBe (Some (3 ))
253253
254- val notFound = Future .find[Int ](futures.iterator )(_ == 11 )
254+ val notFound = Future .find[Int ](futures)(_ == 11 )
255255 Await .result(notFound, defaultTimeout) mustBe (None )
256256 }
257257
You can’t perform that action at this time.
0 commit comments