Tests: Log HTTP requests/response for external hipchat tests
Relates elastic/x-pack-elasticsearch#1774 Original commit: elastic/x-pack-elasticsearch@bdd86236e2
This commit is contained in:
parent
27731eb523
commit
6e6629bd18
|
@ -199,6 +199,8 @@ public class HipChatServiceTests extends AbstractWatcherIntegrationTestCase {
|
|||
private void assertSentMessagesAreValid(int expectedMessageSize, SentMessages messages) {
|
||||
assertThat(messages.count(), is(expectedMessageSize));
|
||||
for (SentMessages.SentMessage message : messages) {
|
||||
logger.info("Request: [{}]", message.getRequest());
|
||||
logger.info("Response: [{}]", message.getResponse());
|
||||
assertThat("Expected no failures, but got [" + message.getFailureReason() + "]", message.successful(), is(true));
|
||||
assertThat(message.getRequest(), notNullValue());
|
||||
assertThat(message.getResponse(), notNullValue());
|
||||
|
|
Loading…
Reference in New Issue