Skip to content

Commit ae6073e

Browse files
committed
Bumps Hystrix to 1.5.1 and RxJava to 1.1.2
- Bump to RxJava 1.1.2 because Hystrix 1.5.1 depends on 1.1.1 - Changes expected behaviour in `RxErrorHandlingSpec` - exceptions thrown `onComplete` do not get propagated to `onError`. Related to this change in RxJava (ReactiveX/RxJava#3155), onComplete *must* return normally. - Code snippets in `RxRatpack.java` updated due to `Observable.x` being renamed `Observable.extend` - ReactiveX/RxJava#3423
1 parent de9acd1 commit ae6073e

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

gradle/dependencies.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ ext {
2222
guava: "18.0",
2323
groovy: "2.4.3",
2424
pac4j: "1.8.5",
25-
rxjava: "1.0.14",
26-
hystrix: "1.4.3",
25+
rxjava: "1.1.2",
26+
hystrix: "1.5.1",
2727
jackson: "2.6.2",
2828
dropwizardMetrics: "3.1.1",
2929
pegdown: "1.5.0",

ratpack-rx/src/main/java/ratpack/rx/RxRatpack.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public static <T> Promise<List<T>> promise(Observable<T> observable) throws Unma
309309
*
310310
* public static void main(String[] args) throws Throwable {
311311
* List<String> results = ExecHarness.yieldSingle(execution ->
312-
* new AsyncService().observe("foo").x(RxRatpack::promise)
312+
* new AsyncService().observe("foo").extend(RxRatpack::promise)
313313
* ).getValue();
314314
*
315315
* assertEquals(Arrays.asList("foo"), results);
@@ -437,7 +437,7 @@ public static <T> Promise<T> promiseSingle(Observable<T> observable) throws Unma
437437
*
438438
* public static void main(String[] args) throws Throwable {
439439
* String result = ExecHarness.yieldSingle(execution ->
440-
* new AsyncService().observe("foo").x(RxRatpack::promiseSingle)
440+
* new AsyncService().observe("foo").extend(RxRatpack::promiseSingle)
441441
* ).getValue();
442442
*
443443
* assertEquals("foo", result);
@@ -456,7 +456,7 @@ public static <T> Promise<T> promiseSingle(Observable<T> observable) throws Unma
456456
* public class Example {
457457
* public static void main(String[] args) throws Throwable {
458458
* String result = ExecHarness.yieldSingle(execution ->
459-
* Observable.<String>empty().singleOrDefault("foo").x(RxRatpack::promiseSingle)
459+
* Observable.<String>empty().singleOrDefault("foo").extend(RxRatpack::promiseSingle)
460460
* ).getValue();
461461
* assertEquals("foo", result);
462462
* }
@@ -550,7 +550,7 @@ public static <T> TransformablePublisher<T> publisher(Observable<T> observable)
550550
*
551551
* public static void main(String[] args) throws Throwable {
552552
* List<String> result = ExecHarness.yieldSingle(execution ->
553-
* new AsyncService().observe("foo").x(RxRatpack::publisher).toList()
553+
* new AsyncService().observe("foo").extend(RxRatpack::publisher).toList()
554554
* ).getValue();
555555
* assertEquals("foo", result.get(0));
556556
* }

ratpack-rx/src/test/groovy/ratpack/rx/RxErrorHandlingSpec.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ class RxErrorHandlingSpec extends RatpackGroovyDslSpec {
200200
thrownException == e
201201
}
202202

203-
def "on complete can throw"() {
203+
def "on complete cannot throw"() {
204204
given:
205205
def e = new Exception("!")
206206

@@ -213,7 +213,7 @@ class RxErrorHandlingSpec extends RatpackGroovyDslSpec {
213213

214214
then:
215215
get()
216-
thrownException == e
216+
noExceptionThrown()
217217
}
218218

219219
def "downstream handler can error"() {
@@ -338,7 +338,7 @@ class RxErrorHandlingSpec extends RatpackGroovyDslSpec {
338338
thrownException == e
339339
}
340340

341-
def "exception thrown by oncomplete throwns"() {
341+
def "exception thrown by oncomplete is not re-thrown"() {
342342
given:
343343
def e = new Exception("!")
344344

@@ -366,7 +366,7 @@ class RxErrorHandlingSpec extends RatpackGroovyDslSpec {
366366
}
367367

368368
then:
369-
thrownException == e
369+
noExceptionThrown()
370370
}
371371

372372
}

0 commit comments

Comments
 (0)