From 1188584bca7622d6d3784b27b498469d0f0f628f Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Wed, 12 Apr 2017 15:31:42 -0600 Subject: [PATCH] Fix broken test --- .../cloud/gateway/test/BaseWebClientTests.java | 6 ++++++ .../cloud/gateway/test/FormIntegrationTests.java | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/BaseWebClientTests.java b/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/BaseWebClientTests.java index 4fa4349da..a9eafd3da 100644 --- a/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/BaseWebClientTests.java +++ b/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/BaseWebClientTests.java @@ -36,6 +36,7 @@ import org.springframework.cloud.netflix.ribbon.StaticServerList; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.annotation.Order; +import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -138,6 +139,11 @@ public class BaseWebClientTests { return Mono.just(ret); } + @RequestMapping(path = "/post", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE) + public Mono> postUrlEncoded(ServerWebExchange exchange) throws IOException { + return post(exchange, null); + } + @RequestMapping("/post") public Mono> post(ServerWebExchange exchange, @RequestBody(required = false) String body) throws IOException { diff --git a/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/FormIntegrationTests.java b/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/FormIntegrationTests.java index c9ea4e3f7..a557e8188 100644 --- a/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/FormIntegrationTests.java +++ b/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/FormIntegrationTests.java @@ -20,7 +20,6 @@ package org.springframework.cloud.gateway.test; import java.nio.charset.Charset; import java.util.Map; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.SpringBootConfiguration; @@ -56,7 +55,6 @@ import reactor.test.StepVerifier; public class FormIntegrationTests extends BaseWebClientTests { @Test - @Ignore("FIXME: Only one connection receive subscriber allowed.") public void formUrlencodedWorks() { LinkedMultiValueMap formData = new LinkedMultiValueMap<>(); formData.add("foo", "bar");