summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
authorIvan Frade <ifrade@google.com>2019-10-09 16:40:17 -0700
committerIvan Frade <ifrade@google.com>2019-10-15 12:20:37 -0700
commit914e320ac6db23f7461dd997022d7799d0a4794d (patch)
treeabda7eca06a650dece0ef43dcaa4e35f6e2a6a50 /org.eclipse.jgit.test
parentbca00aa5f464e1bc3aa00d4b757554b54f35ddb2 (diff)
downloadjgit-914e320ac6db23f7461dd997022d7799d0a4794d.tar.gz
jgit-914e320ac6db23f7461dd997022d7799d0a4794d.zip
ProtocolV2Parser: Introduce advertise sideband-all option
The flag enabling sideband-all is used in two places: in UploadPack for advertisement and in the protocol parser to read it from the request. This leds to problems in distributed deployments where the two requests of a fetch can go to different servers with different configurations. Use the existing allowsidebandall to accept the sideband-all request (and respond to it) and introduce a new "advertisesidebandall" to toggle the advertising of the feature. Change-Id: I892d541bc3f321606c89bad1d333b079dce6b5fa Signed-off-by: Ivan Frade <ifrade@google.com>
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
index 2f370d8c52..6d53555e9f 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
@@ -501,8 +501,11 @@ public class UploadPackTest {
}
@Test
- public void testV2CapabilitiesAllowSidebandAll() throws Exception {
- checkAdvertisedIfAllowed("uploadpack", "allowsidebandall", "sideband-all");
+ public void testV2CapabilitiesAdvertiseSidebandAll() throws Exception {
+ server.getConfig().setBoolean("uploadpack", null, "allowsidebandall",
+ true);
+ checkAdvertisedIfAllowed("uploadpack", "advertisesidebandall",
+ "sideband-all");
checkUnadvertisedIfUnallowed("sideband-all");
}