Skip to content

Commit

Permalink
Small duplication fix
Browse files Browse the repository at this point in the history
  • Loading branch information
HardNorth committed Apr 2, 2024
1 parent 5b4f169 commit 83d8068
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,14 +284,15 @@ public void verify_rp_client_http_logging() throws Exception {
executeWithClosingOnException(clientExecutor, ss, serverCallable, clientCallable);

assertThat(listAppender.list, hasSize(greaterThan(10)));
assertThat(listAppender.list.get(0).getMessage(), equalTo("--> POST " + baseUrl + "/api/v1/unit-test/launch http/1.1"));
String requestTarget = "--> POST " + baseUrl + "/api/v1/unit-test/launch http/1.1";
assertThat(listAppender.list.get(0).getMessage(), equalTo(requestTarget));
List<String> messages = listAppender.list.stream().map(ILoggingEvent::getMessage).collect(Collectors.toList());
assertThat(messages, hasItem("Host: " + host));
listAppender.list.clear();

executeWithClosing(clientExecutor, ss, serverCallable, clientCallable);

assertThat(listAppender.list.get(0).getMessage(), equalTo("--> POST " + baseUrl + "/api/v1/unit-test/launch http/1.1"));
assertThat(listAppender.list.get(0).getMessage(), equalTo(requestTarget));
messages = listAppender.list.stream().map(ILoggingEvent::getMessage).collect(Collectors.toList());
assertThat(messages, hasItem("Cookie: " + COOKIE));
}
Expand Down

0 comments on commit 83d8068

Please sign in to comment.