diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2024-12-15 21:40:40 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2024-12-15 21:40:40 +0100 |
commit | 4c982d017de302878bead001e7ed040e00ec6322 (patch) | |
tree | edc0c63556ee8e9d536fa2de2249878732b8ef4c /org.eclipse.jgit.test/tst | |
parent | 9cf0a1f174886f844f61d056d4c3383415d27b9e (diff) | |
parent | 6aefc8ec82276bc6f796e3ebc69e181de2638c3e (diff) | |
download | jgit-4c982d017de302878bead001e7ed040e00ec6322.tar.gz jgit-4c982d017de302878bead001e7ed040e00ec6322.zip |
Merge branch 'stable-7.1'
* stable-7.1:
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: I772dd3b3ce7f27e33c1879ce21ec024cc2f9c52a
Diffstat (limited to 'org.eclipse.jgit.test/tst')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java | 12 |
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())); } |