Skip to content

Commit b07bae9

Browse files
committed
Fix issue #1044
1 parent ccac9e7 commit b07bae9

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,4 +609,14 @@ class RxScalaDemo extends JUnitSuite {
609609
val m = o.toMap(keySelector, valueSelector, mapFactory)
610610
println(m.toBlockingObservable.single)
611611
}
612+
613+
@Test def retryExample1(): Unit = {
614+
val o : Observable[String] = List("alice", "bob", "carol").toObservable
615+
assertEquals(List("alice", "bob", "carol"), o.retry.toBlockingObservable.toList)
616+
}
617+
618+
@Test def retryExample2(): Unit = {
619+
val o : Observable[String] = List("alice", "bob", "carol").toObservable
620+
assertEquals(List("alice", "bob", "carol"), o.retry(3).toBlockingObservable.toList)
621+
}
612622
}

language-adaptors/rxjava-scala/src/main/scala/rx/lang/scala/Observable.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2115,7 +2115,7 @@ trait Observable[+T]
21152115
* emits [1, 2, 3, 4, 5] then the complete output would be [1, 2, 1, 2, 3, 4, 5, onCompleted].
21162116
* @return Observable with retry logic.
21172117
*/
2118-
def retry: Observable[T] = {
2118+
def retry(): Observable[T] = {
21192119
toScalaObservable[T](asJavaObservable.retry())
21202120
}
21212121

0 commit comments

Comments
 (0)