From c51d4327697ba5437ddaf6a4e70ece1abdc527e3 Mon Sep 17 00:00:00 2001 From: Dave Borowitz Date: Tue, 12 Jan 2016 13:54:01 -0500 Subject: [PATCH] AbstractSubmit: Include error message when submit fails Change-Id: Idf7501017d8457fdd42f7e933a6e906c282426ee --- .../google/gerrit/acceptance/rest/change/AbstractSubmit.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/AbstractSubmit.java b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/AbstractSubmit.java index 85e6d382f9..d4b9f988bf 100644 --- a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/AbstractSubmit.java +++ b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/AbstractSubmit.java @@ -211,7 +211,9 @@ public abstract class AbstractSubmit extends AbstractDaemonTest { SubmitInput subm = new SubmitInput(); RestResponse r = adminSession.post("/changes/" + changeId + "/submit", subm); - assertThat(r.getStatusCode()).isEqualTo(expectedStatus); + assertThat(r.getStatusCode()) + .named("Status code [" + r.getEntityContent() + "]") + .isEqualTo(expectedStatus); if (expectedStatus == HttpStatus.SC_OK) { checkArgument(msg == null, "msg must be null for successful submits"); ChangeInfo change =