summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse <dpursehouse@collab.net>2018-09-06 17:49:16 +0900
committerDavid Pursehouse <dpursehouse@collab.net>2018-09-06 20:30:51 +0900
commit818264876a368118ded6d34ea52481afa13a0b47 (patch)
treec1c97836ddd5e04a590cf1b36f55144b84d648ce
parent429687d2ad47bc7093a45b6c62b8f29275a1eb48 (diff)
AbstractSubmit: Remove redundant assertion about null IOException
The call to assertThat(e).isNull() causes ErrorProne to raise a warning that there is a missing call to fail(), because it thinks that the exception is expected. Instead of asserting on the IOException, rethrow it as the cause of a new ValidationException. Change-Id: I7dd681196f8d63eb6f2a0063b55aa94d0ec1d71f
-rw-r--r--gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/AbstractSubmit.java2
1 files changed, 1 insertions, 1 deletions
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 94fa99b007..7d55c66aa4 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
@@ -760,7 +760,7 @@ public abstract class AbstractSubmit extends AbstractDaemonTest {
try (RevWalk rw = args.newRevWalk()) {
rw.parseBody(rw.parseCommit(args.getCommands().get("refs/heads/master").getNewId()));
} catch (IOException e) {
- assertThat(e).isNull();
+ throw new ValidationException("Unexpected exception", e);
}
projectsCalled.add(args.getProject().get());
if (projectsCalled.size() == 2) {