Skip to content

Commit

Permalink
Trying to make tests less flakey
Browse files Browse the repository at this point in the history
  • Loading branch information
marcingrzejszczak committed Jan 20, 2018
1 parent c40b3e2 commit 266061f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,13 @@ public static void setup() {
"management.security.enabled=false").run();
ArrayListSpanReporter accumulator = context.getBean(ArrayListSpanReporter.class);
int port = context.getBean(Environment.class).getProperty("local.server.port", Integer.class);
accumulator.clear();

Mono<ClientResponse> exchange = WebClient.create().get()
.uri("http://localhost:" + port + "/api/c2/10").exchange();
ClientResponse response = exchange.block();

Awaitility.await().untilAsserted(() -> {
ClientResponse response = exchange.block();
then(response.statusCode().value()).isEqualTo(200);
then(accumulator.getSpans()).hasSize(1);
});
Expand Down

0 comments on commit 266061f

Please sign in to comment.