Execute WebClientDataBufferAllocatingTests during all builds

This commit reverts b2704e1db6 and
configures the ReactorResourceFactory not to use global resources,
thereby allowing all tests in WebClientDataBufferAllocatingTests to
execute within approximately 2 seconds again on Mac OS.
This commit is contained in:
Sam Brannen 2019-09-20 14:09:00 +02:00
parent 3603e0c448
commit f0e160fc67
1 changed files with 4 additions and 8 deletions

View File

@ -39,11 +39,9 @@ import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.http.client.reactive.ReactorClientHttpConnector; import org.springframework.http.client.reactive.ReactorClientHttpConnector;
import org.springframework.http.client.reactive.ReactorResourceFactory; import org.springframework.http.client.reactive.ReactorResourceFactory;
import org.springframework.tests.EnabledForTestGroups;
import org.springframework.web.reactive.function.UnsupportedMediaTypeException; import org.springframework.web.reactive.function.UnsupportedMediaTypeException;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.tests.TestGroup.PERFORMANCE;
/** /**
* WebClient integration tests focusing on data buffer management. * WebClient integration tests focusing on data buffer management.
@ -51,25 +49,23 @@ import static org.springframework.tests.TestGroup.PERFORMANCE;
* @author Rossen Stoyanchev * @author Rossen Stoyanchev
* @author Sam Brannen * @author Sam Brannen
*/ */
@EnabledForTestGroups(PERFORMANCE)
public class WebClientDataBufferAllocatingTests extends AbstractDataBufferAllocatingTests { public class WebClientDataBufferAllocatingTests extends AbstractDataBufferAllocatingTests {
private static final Duration DELAY = Duration.ofSeconds(5); private static final Duration DELAY = Duration.ofSeconds(5);
private MockWebServer server; private final ReactorResourceFactory factory = new ReactorResourceFactory();
private final MockWebServer server = new MockWebServer();
private WebClient webClient; private WebClient webClient;
private ReactorResourceFactory factory;
@BeforeEach @BeforeEach
public void setUp() { public void setUp() {
this.factory = new ReactorResourceFactory(); this.factory.setUseGlobalResources(false);
this.factory.afterPropertiesSet(); this.factory.afterPropertiesSet();
this.server = new MockWebServer();
this.webClient = WebClient this.webClient = WebClient
.builder() .builder()
.clientConnector(initConnector()) .clientConnector(initConnector())