mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-22 12:56:53 +00:00
[TEST] Expand failure message for wildfly integration tests
This commit is contained in:
parent
6b4ea4e6fb
commit
64adaffe11
@ -26,6 +26,7 @@ import org.apache.http.entity.ContentType;
|
||||
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;
|
||||
@ -78,7 +79,9 @@ public class WildflyIT extends LuceneTestCase {
|
||||
}
|
||||
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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user