BAEL-3285 | Fixed test name, added logging
This commit is contained in:
parent
4aeef357e3
commit
93f31a8ac2
@ -6,9 +6,12 @@ import reactor.core.publisher.Flux;
|
|||||||
import reactor.core.scheduler.Schedulers;
|
import reactor.core.scheduler.Schedulers;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
public class Client {
|
public class Client {
|
||||||
|
|
||||||
|
private static final Logger LOG = Logger.getLogger(Client.class.getName());
|
||||||
|
|
||||||
private WebClient webClient;
|
private WebClient webClient;
|
||||||
|
|
||||||
public Client(String uri) {
|
public Client(String uri) {
|
||||||
@ -16,6 +19,8 @@ public class Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Mono<User> getUser(int id) {
|
public Mono<User> getUser(int id) {
|
||||||
|
LOG.info(String.format("Calling getUser(%d)", id));
|
||||||
|
|
||||||
return webClient.get()
|
return webClient.get()
|
||||||
.uri("/user/{id}", id)
|
.uri("/user/{id}", id)
|
||||||
.retrieve()
|
.retrieve()
|
||||||
|
@ -36,7 +36,7 @@ public class ClientIntegrationTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void checkIfCallsAreExecutedSimultaneously() {
|
public void givenClient_whenFetchingUsers_thenExecutionTimeIsLessThanDouble() {
|
||||||
// Arrange
|
// Arrange
|
||||||
int requestsNumber = 5;
|
int requestsNumber = 5;
|
||||||
int singleRequestTime = 1000;
|
int singleRequestTime = 1000;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user