From 5f41d85f8a409718301b75ddb22c25778c0ac3d8 Mon Sep 17 00:00:00 2001 From: Srikanta Date: Thu, 26 Sep 2019 18:03:16 -0700 Subject: [PATCH 1/2] Fix errors caused by upgrading to latest reactor versions --- .../azure/core/http/netty/ReactorNettyClientTests.java | 9 ++++++--- .../azure/core/http/okhttp/OkHttpAsyncHttpClient.java | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/ReactorNettyClientTests.java b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/ReactorNettyClientTests.java index 3d857d411826..cf0a064941d9 100644 --- a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/ReactorNettyClientTests.java +++ b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/ReactorNettyClientTests.java @@ -80,11 +80,14 @@ public void testMultipleSubscriptionsEmitsError() { HttpResponse response = getResponse("/short"); // Subscription:1 response.getBodyAsByteArray().block(); + // Subscription:2 StepVerifier.create(response.getBodyAsByteArray()) - .expectNextCount(0) // TODO: Check with smaldini, what is the verifier operator equivalent to .awaitDone(20, TimeUnit.SECONDS) - .verifyError(IllegalStateException.class); - + .expectNextCount(0) + // Reactor netty 0.9.0.RELEASE behavior changed - second subscription returns onComplete() instead + // of throwing an error + //.verifyError(IllegalStateException.class); + .verifyComplete(); } @Test diff --git a/sdk/core/azure-core-http-okhttp/src/main/java/com/azure/core/http/okhttp/OkHttpAsyncHttpClient.java b/sdk/core/azure-core-http-okhttp/src/main/java/com/azure/core/http/okhttp/OkHttpAsyncHttpClient.java index 2f3153e45c70..502f7439980d 100644 --- a/sdk/core/azure-core-http-okhttp/src/main/java/com/azure/core/http/okhttp/OkHttpAsyncHttpClient.java +++ b/sdk/core/azure-core-http-okhttp/src/main/java/com/azure/core/http/okhttp/OkHttpAsyncHttpClient.java @@ -189,7 +189,7 @@ private static class OkHttpResponse extends HttpResponse { rb -> Mono.just(rb), // Resource cleanup // square.github.io/okhttp/4.x/okhttp/okhttp3/-response-body/#the-response-body-must-be-closed - ResponseBody::close); + ResponseBody::close, /* Change in behavior since reactor-core 3.3.0.RELEASE */ false); } } From fdf871445e28bbb1e0276e68b05393f2c69070b4 Mon Sep 17 00:00:00 2001 From: Srikanta Date: Thu, 26 Sep 2019 21:20:11 -0700 Subject: [PATCH 2/2] Update netty version to fix failures on linux --- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parent/pom.xml b/parent/pom.xml index 675a4153fc14..63742fc6bd26 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -115,7 +115,7 @@ 1.7.0 3.3.0.RELEASE 0.9.0.RELEASE - 4.1.33.Final + 4.1.39.Final 4.1.0 2.5.2 0.20.0