aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2024-12-15 21:25:23 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2024-12-15 21:25:23 +0100
commit6aefc8ec82276bc6f796e3ebc69e181de2638c3e (patch)
treeb6676849c0025fd8657c26a5b18c6748d3b60ebe /org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
parentcca2ef12eec44b5b2140761baf13e2a611a654f3 (diff)
parent4f2e6f788fd7229a3d99fce5d0e64db1ddf5371e (diff)
downloadjgit-6aefc8ec82276bc6f796e3ebc69e181de2638c3e.tar.gz
jgit-6aefc8ec82276bc6f796e3ebc69e181de2638c3e.zip
Merge branch 'stable-7.0' into stable-7.1
* stable-7.0: FileSnapshot: fix warnings Optionally.Hard: avoid Optional creation on every use, Pack: fix threading bug getting idx Fix potential NPE in TreeWalk#getFilterCommandDefinition Advertise "agent" capability when using protocol v2 FileSnapshot: silence "Stale file handle" exceptions Change-Id: I4fdea7450f27eebfa7ae08002fd51e67b58bf6bb
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java12
1 files changed, 6 insertions, 6 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 064d863bf6..aaecfd290e 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
@@ -502,15 +502,15 @@ public class UploadPackTest {
assertThat(hook.capabilitiesRequest, notNullValue());
assertThat(pckIn.readString(), is("version 2"));
assertThat(
- Arrays.asList(pckIn.readString(), pckIn.readString(),
- pckIn.readString()),
+ Arrays.asList(pckIn.readString(),pckIn.readString(),
+ pckIn.readString(), pckIn.readString()),
// TODO(jonathantanmy) This check is written this way
// to make it simple to see that we expect this list of
// capabilities, but probably should be loosened to
// allow additional commands to be added to the list,
// and additional capabilities to be added to existing
// commands without requiring test changes.
- hasItems("ls-refs", "fetch=shallow", "server-option"));
+ hasItems("agent=" + UserAgent.get() ,"ls-refs", "fetch=shallow", "server-option"));
assertTrue(PacketLineIn.isEnd(pckIn.readString()));
}
@@ -536,7 +536,7 @@ public class UploadPackTest {
lines.add(line);
}
}
- assertThat(lines, containsInAnyOrder("ls-refs", "fetch", "server-option"));
+ assertThat(lines, containsInAnyOrder("ls-refs", "fetch", "server-option", "agent=" + UserAgent.get()));
}
private void checkUnadvertisedIfUnallowed(String configSection,
@@ -643,9 +643,9 @@ public class UploadPackTest {
assertThat(pckIn.readString(), is("version 2"));
assertThat(
- Arrays.asList(pckIn.readString(), pckIn.readString(),
+ Arrays.asList(pckIn.readString(),pckIn.readString(), pckIn.readString(),
pckIn.readString()),
- hasItems("ls-refs", "fetch=shallow", "server-option"));
+ hasItems("agent="+ UserAgent.get(),"ls-refs", "fetch=shallow", "server-option"));
assertTrue(PacketLineIn.isEnd(pckIn.readString()));
}