Skip to content

Commit 8ae65eb

Browse files
Fixing tests
1 parent bd922b8 commit 8ae65eb

File tree

1 file changed

+7
-8
lines changed
  • language-adaptors/rxjava-scala/src/examples/scala/rx/lang/scala/examples

1 file changed

+7
-8
lines changed

language-adaptors/rxjava-scala/src/examples/scala/rx/lang/scala/examples/RxScalaDemo.scala

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ import org.scalatest.junit.JUnitSuite
3030

3131
import rx.lang.scala.Notification
3232
import rx.lang.scala.Observable
33-
//import rx.lang.scala.observable
34-
import rx.lang.scala.concurrency.{NewThreadScheduler, Schedulers}
33+
import rx.lang.scala.concurrency._
3534

3635
@Ignore // Since this doesn't do automatic testing, don't increase build time unnecessarily
3736
class RxScalaDemo extends JUnitSuite {
@@ -429,12 +428,12 @@ class RxScalaDemo extends JUnitSuite {
429428
}
430429

431430
@Test def observableLikeFuture1() {
432-
implicit val scheduler = Schedulers.threadPoolForIO
433-
val o1 = observable {
431+
implicit val scheduler = ThreadPoolForIOScheduler()
432+
val o1 = Observable {
434433
Thread.sleep(1000)
435434
5
436435
}
437-
val o2 = observable {
436+
val o2 = Observable {
438437
Thread.sleep(500)
439438
4
440439
}
@@ -444,14 +443,14 @@ class RxScalaDemo extends JUnitSuite {
444443
println(System.currentTimeMillis - t1)
445444
}
446445

447-
@Test def observableLikeFuture2() {
446+
@Test def ObservableLikeFuture2() {
448447
class Friend {}
449448
val session = new Object {
450449
def getFriends: List[Friend] = List(new Friend, new Friend)
451450
}
452451

453-
implicit val scheduler = Schedulers.threadPoolForIO
454-
val o: Observable[List[Friend]] = observable {
452+
implicit val scheduler = ThreadPoolForIOScheduler()
453+
val o: Observable[List[Friend]] = Observable {
455454
session.getFriends
456455
}
457456
o.subscribe(

0 commit comments

Comments
 (0)