disable client pool for now, tests work without repeating

This commit is contained in:
Spencer Gibb
2017-01-16 21:03:18 -07:00
parent cdb97f6446
commit a722c61ea5
2 changed files with 5 additions and 7 deletions

View File

@@ -48,7 +48,7 @@ public class GatewayAutoConfiguration {
@Bean
@ConditionalOnMissingBean
public WebClient webClient() {
return WebClient.builder(new ReactorClientHttpConnector()).build();
return WebClient.builder(new ReactorClientHttpConnector(opts -> opts.disablePool())).build();
}
@Bean

View File

@@ -2,7 +2,6 @@ package org.springframework.cloud.gateway.test;
import java.time.Duration;
import java.util.Map;
import java.util.stream.IntStream;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -36,7 +35,6 @@ import static org.springframework.web.reactive.function.client.ClientRequest.GET
import static org.springframework.web.reactive.function.client.ClientRequest.POST;
import reactor.core.publisher.Mono;
import reactor.ipc.netty.resources.PoolResources;
import reactor.test.StepVerifier;
@RunWith(SpringRunner.class)
@@ -70,11 +68,11 @@ public class GatewayIntegrationTests {
}
private void verify(ResultVerifier verifier) {
Result result = new Result();
/*Result result = new Result();
IntStream.range(0, 3).forEach( i -> {
try {
try {*/
verifier.verify();
result.passedOnce = true;
/*result.passedOnce = true;
} catch (AssertionError e) {
result.error = e;
}
@@ -82,7 +80,7 @@ public class GatewayIntegrationTests {
if (!result.passedOnce && result.error != null) {
throw result.error;
}
}*/
}
@Test