summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.ssh.apache.test/tst/org
diff options
context:
space:
mode:
authorThomas Wolf <thomas.wolf@paranor.ch>2020-07-28 09:44:43 +0200
committerThomas Wolf <thomas.wolf@paranor.ch>2020-07-28 09:47:07 +0200
commit835e3225a83f50dbab64f4591d8fa2a60adad77c (patch)
treeaedb176d3c37f5132a981555fb3a3d382d866e9e /org.eclipse.jgit.ssh.apache.test/tst/org
parenteb67862cbaf8f77a7ebb6e01a0d43366d3a223f0 (diff)
downloadjgit-835e3225a83f50dbab64f4591d8fa2a60adad77c.tar.gz
jgit-835e3225a83f50dbab64f4591d8fa2a60adad77c.zip
sshd: use PropertyResolver in test
Improve the SshTestGitServer API for accessing the server properties. Instead of returning the raw property map, return the proper sshd API abstraction PropertyResolver. This makes the interface more resilient against upstream changes. Change-Id: Ie5b685bddc4e59f3eb6c121026d3658d57618ca4 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit.ssh.apache.test/tst/org')
-rw-r--r--org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java
index a58ee2e992..f27af6e196 100644
--- a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java
+++ b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java
@@ -21,6 +21,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import org.apache.sshd.client.config.hosts.KnownHostEntry;
+import org.apache.sshd.common.PropertyResolverUtils;
import org.apache.sshd.server.ServerFactoryManager;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.errors.TransportException;
@@ -189,8 +190,8 @@ public class ApacheSshTest extends SshTestBase {
*/
@Test
public void testCloneAndFetchWithSessionLimit() throws Exception {
- server.getProperties().put(ServerFactoryManager.MAX_CONCURRENT_SESSIONS,
- Integer.valueOf(2));
+ PropertyResolverUtils.updateProperty(server.getPropertyResolver(),
+ ServerFactoryManager.MAX_CONCURRENT_SESSIONS, 2);
File localClone = cloneWith("ssh://localhost/doesntmatter",
defaultCloneDir, null, //
"Host localhost", //