Browse Source

Fix broken test

pull/41/head
Spencer Gibb 8 years ago
parent
commit
1188584bca
No known key found for this signature in database
GPG Key ID: 7788A47380690861
  1. 6
      spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/BaseWebClientTests.java
  2. 2
      spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/FormIntegrationTests.java

6
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; @@ -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 { @@ -138,6 +139,11 @@ public class BaseWebClientTests {
return Mono.just(ret);
}
@RequestMapping(path = "/post", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
public Mono<Map<String, Object>> postUrlEncoded(ServerWebExchange exchange) throws IOException {
return post(exchange, null);
}
@RequestMapping("/post")
public Mono<Map<String, Object>> post(ServerWebExchange exchange,
@RequestBody(required = false) String body) throws IOException {

2
spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/FormIntegrationTests.java

@ -20,7 +20,6 @@ package org.springframework.cloud.gateway.test; @@ -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; @@ -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<String, String> formData = new LinkedMultiValueMap<>();
formData.add("foo", "bar");

Loading…
Cancel
Save