Skip to content

Commit

Permalink
[TEST] Expand failure message for wildfly integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dakrone committed Feb 6, 2018
1 parent 3dbd8b8 commit 64b2ee4
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
import org.apache.lucene.util.LuceneTestCase;
import org.elasticsearch.Build;
import org.elasticsearch.Version;
Expand Down Expand Up @@ -78,7 +79,9 @@ public void testTransportClient() throws URISyntaxException, IOException {
}
put.setEntity(new StringEntity(body, ContentType.APPLICATION_JSON));
try (CloseableHttpResponse response = client.execute(put)) {
assertThat(response.getStatusLine().getStatusCode(), equalTo(201));
int status = response.getStatusLine().getStatusCode();
assertThat("expected a 201 response but got: " + status + " - body: " + EntityUtils.toString(response.getEntity()),
status, equalTo(201));
}

final HttpGet get = new HttpGet(new URI(str));
Expand Down

0 comments on commit 64b2ee4

Please sign in to comment.