From cadda60f8110dc90e43b5c52b649ec5657be2953 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Thu, 21 Nov 2019 10:01:49 +0100 Subject: [PATCH] WIP: WebClient --- .../GraphApiExchangeFilterFunctionIntegrationTest.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/test/java/de/juplo/facebook/errors/GraphApiExchangeFilterFunctionIntegrationTest.java b/src/test/java/de/juplo/facebook/errors/GraphApiExchangeFilterFunctionIntegrationTest.java index ea41d27..2e3ae22 100644 --- a/src/test/java/de/juplo/facebook/errors/GraphApiExchangeFilterFunctionIntegrationTest.java +++ b/src/test/java/de/juplo/facebook/errors/GraphApiExchangeFilterFunctionIntegrationTest.java @@ -11,6 +11,7 @@ import org.junit.Before; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.http.HttpStatus; import org.springframework.http.client.reactive.JettyClientHttpConnector; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Mono; @@ -53,12 +54,9 @@ public class GraphApiExchangeFilterFunctionIntegrationTest @Test public void testValidError() { - LOG.info("testValidError"); - - server .enqueue(new MockResponse() - .setStatus("400") + .setResponseCode(HttpStatus.BAD_REQUEST.value()) .setHeader("Content-Type", "application/json") .setBody( "{\n" + @@ -89,6 +87,6 @@ public class GraphApiExchangeFilterFunctionIntegrationTest assertEquals("(#613) Calls to stream have exceeded the rate of 600 calls per 600 seconds.", e.getMessage()); assertEquals(Type.OAuthException, e.getType()); }) - .verify(Duration.ofSeconds(3)); + .verifyLater(); } } -- 2.20.1