From: Kai Moritz Date: Thu, 21 Nov 2019 09:01:49 +0000 (+0100) Subject: WIP: WebClient X-Git-Tag: wip-webclient~31 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=cadda60f8110dc90e43b5c52b649ec5657be2953;p=facebook-errors WIP: WebClient --- 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(); } }