Polishing
This commit is contained in:
@@ -16,7 +16,9 @@
|
||||
package io.spring.sample.graphql;
|
||||
|
||||
import java.net.URI;
|
||||
import java.time.Duration;
|
||||
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -38,8 +40,7 @@ class WebFluxSecuritySampleTests {
|
||||
@LocalServerPort
|
||||
private int port;
|
||||
|
||||
@Autowired
|
||||
private WebGraphQlTester graphQlTester;
|
||||
private WebSocketGraphQlTester graphQlTester;
|
||||
|
||||
@BeforeEach
|
||||
public void setUp() {
|
||||
@@ -47,6 +48,11 @@ class WebFluxSecuritySampleTests {
|
||||
this.graphQlTester = WebSocketGraphQlTester.create(url, new ReactorNettyWebSocketClient());
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
void tearDown() {
|
||||
this.graphQlTester.stop().block(Duration.ofSeconds(5));
|
||||
}
|
||||
|
||||
@Test
|
||||
void printError() {
|
||||
this.graphQlTester.documentName("employeesNamesAndSalaries")
|
||||
|
||||
@@ -48,6 +48,14 @@ public interface HttpGraphQlClient extends WebGraphQlClient {
|
||||
return new DefaultHttpGraphQlClient.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Variant of {@link #builder()} with a pre-configured {@code WebClient}
|
||||
* to mutate and customize further through the returned builder.
|
||||
*/
|
||||
static Builder<?> builder(WebClient webClient) {
|
||||
return builder(webClient.mutate());
|
||||
}
|
||||
|
||||
/**
|
||||
* Variant of {@link #builder()} with a pre-configured {@code WebClient}
|
||||
* to mutate and customize further through the returned builder.
|
||||
|
||||
Reference in New Issue
Block a user