BAEL-3285 | Fixed test name, added logging

This commit is contained in:
Maciej Andrearczyk 2019-10-02 18:32:00 +02:00 committed by Maciej Andrearczyk
parent 4aeef357e3
commit 93f31a8ac2
2 changed files with 6 additions and 1 deletions

View File

@ -6,9 +6,12 @@ import reactor.core.publisher.Flux;
import reactor.core.scheduler.Schedulers;
import java.util.List;
import java.util.logging.Logger;
public class Client {
private static final Logger LOG = Logger.getLogger(Client.class.getName());
private WebClient webClient;
public Client(String uri) {
@ -16,6 +19,8 @@ public class Client {
}
public Mono<User> getUser(int id) {
LOG.info(String.format("Calling getUser(%d)", id));
return webClient.get()
.uri("/user/{id}", id)
.retrieve()

View File

@ -36,7 +36,7 @@ public class ClientIntegrationTest {
}
@Test
public void checkIfCallsAreExecutedSimultaneously() {
public void givenClient_whenFetchingUsers_thenExecutionTimeIsLessThanDouble() {
// Arrange
int requestsNumber = 5;
int singleRequestTime = 1000;