Skip to content

Commit

Permalink
Bumps Hystrix to 1.5.1 and RxJava to 1.1.2
Browse files Browse the repository at this point in the history
- Bump to RxJava 1.1.2. Upgrading to 1.1.1, saw test failures in
  `HystrixRequestCachingSpec` due to `ClassCastException`. I _think_ it
may be related to a bug that was fixed in 1.1.2
(ReactiveX/RxJava#3697).
- 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. This change went was included in RxJava 1.0.15.
- Code snippets in `RxRatpack.java` updated due to `Observable.x` being
  renamed `Observable.extend` -
ReactiveX/RxJava#3423. Also part of RxJava 1.0.15
  • Loading branch information
hyleung committed Apr 3, 2016
1 parent de9acd1 commit 16040c5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ ext {
guava: "18.0",
groovy: "2.4.3",
pac4j: "1.8.5",
rxjava: "1.0.14",
hystrix: "1.4.3",
rxjava: "1.1.2",
hystrix: "1.5.1",
jackson: "2.6.2",
dropwizardMetrics: "3.1.1",
pegdown: "1.5.0",
Expand Down
8 changes: 4 additions & 4 deletions ratpack-rx/src/main/java/ratpack/rx/RxRatpack.java
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ public static <T> Promise<List<T>> promise(Observable<T> observable) throws Unma
*
* public static void main(String[] args) throws Throwable {
* List<String> results = ExecHarness.yieldSingle(execution ->
* new AsyncService().observe("foo").x(RxRatpack::promise)
* new AsyncService().observe("foo").extend(RxRatpack::promise)
* ).getValue();
*
* assertEquals(Arrays.asList("foo"), results);
Expand Down Expand Up @@ -437,7 +437,7 @@ public static <T> Promise<T> promiseSingle(Observable<T> observable) throws Unma
*
* public static void main(String[] args) throws Throwable {
* String result = ExecHarness.yieldSingle(execution ->
* new AsyncService().observe("foo").x(RxRatpack::promiseSingle)
* new AsyncService().observe("foo").extend(RxRatpack::promiseSingle)
* ).getValue();
*
* assertEquals("foo", result);
Expand All @@ -456,7 +456,7 @@ public static <T> Promise<T> promiseSingle(Observable<T> observable) throws Unma
* public class Example {
* public static void main(String[] args) throws Throwable {
* String result = ExecHarness.yieldSingle(execution ->
* Observable.<String>empty().singleOrDefault("foo").x(RxRatpack::promiseSingle)
* Observable.<String>empty().singleOrDefault("foo").extend(RxRatpack::promiseSingle)
* ).getValue();
* assertEquals("foo", result);
* }
Expand Down Expand Up @@ -550,7 +550,7 @@ public static <T> TransformablePublisher<T> publisher(Observable<T> observable)
*
* public static void main(String[] args) throws Throwable {
* List<String> result = ExecHarness.yieldSingle(execution ->
* new AsyncService().observe("foo").x(RxRatpack::publisher).toList()
* new AsyncService().observe("foo").extend(RxRatpack::publisher).toList()
* ).getValue();
* assertEquals("foo", result.get(0));
* }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class RxErrorHandlingSpec extends RatpackGroovyDslSpec {
thrownException == e
}

def "on complete can throw"() {
def "on complete cannot throw"() {
given:
def e = new Exception("!")

Expand All @@ -213,7 +213,7 @@ class RxErrorHandlingSpec extends RatpackGroovyDslSpec {

then:
get()
thrownException == e
noExceptionThrown()
}

def "downstream handler can error"() {
Expand Down Expand Up @@ -338,7 +338,7 @@ class RxErrorHandlingSpec extends RatpackGroovyDslSpec {
thrownException == e
}

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

Expand Down Expand Up @@ -366,7 +366,7 @@ class RxErrorHandlingSpec extends RatpackGroovyDslSpec {
}

then:
thrownException == e
noExceptionThrown()
}

}

0 comments on commit 16040c5

Please sign in to comment.