aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TestProtocolTest.java
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2018-09-29 13:20:02 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2018-09-30 14:34:14 +0900
commit981e403e599fc152ef11b1f919464d513973b3e5 (patch)
tree8ba146c524743cc5ea7d3076cf7288a232ebd8f7 /org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TestProtocolTest.java
parent0b292b908594d74e80a03be050604a3a079e412d (diff)
downloadjgit-981e403e599fc152ef11b1f919464d513973b3e5.tar.gz
jgit-981e403e599fc152ef11b1f919464d513973b3e5.zip
TestProtocolTest: Add missing calls to fail()
Error Prone reports: Not calling fail() when expecting an exception masks bugs See https://errorprone.info/bugpattern/MissingFail Change-Id: I58ad45a87dcf7d646dce056d20776d62faafbfef Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TestProtocolTest.java')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TestProtocolTest.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TestProtocolTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TestProtocolTest.java
index 953c9fc30a..1c4d0cfe24 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TestProtocolTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TestProtocolTest.java
@@ -46,6 +46,7 @@ package org.eclipse.jgit.transport;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
import java.util.ArrayList;
import java.util.List;
@@ -238,6 +239,7 @@ public class TestProtocolTest {
.setRemote(user1Uri.toString())
.setRefSpecs(MASTER)
.call();
+ fail("accepted not permitted fetch");
} catch (InvalidRemoteException expected) {
// Expected.
}
@@ -282,6 +284,7 @@ public class TestProtocolTest {
.setRemote(user1Uri.toString())
.setRefSpecs(HEADS)
.call();
+ fail("accepted not permitted push");
} catch (TransportException expected) {
assertTrue(expected.getMessage().contains(
JGitText.get().pushNotPermitted));