This is an automated email from the ASF dual-hosted git repository.

lgoldstein pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mina-sshd.git


The following commit(s) were added to refs/heads/master by this push:
     new ab02b9c  Fixed timeout value for ServerProxyAcceptorTest
ab02b9c is described below

commit ab02b9cdf14566f0385566e3d735c6ff42aef8d8
Author: Lyor Goldstein <lgoldst...@apache.org>
AuthorDate: Thu May 21 20:19:56 2020 +0300

    Fixed timeout value for ServerProxyAcceptorTest
---
 .../test/java/org/apache/sshd/server/ServerProxyAcceptorTest.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/sshd-core/src/test/java/org/apache/sshd/server/ServerProxyAcceptorTest.java 
b/sshd-core/src/test/java/org/apache/sshd/server/ServerProxyAcceptorTest.java
index cbdd13e..0d09ec9 100644
--- 
a/sshd-core/src/test/java/org/apache/sshd/server/ServerProxyAcceptorTest.java
+++ 
b/sshd-core/src/test/java/org/apache/sshd/server/ServerProxyAcceptorTest.java
@@ -76,11 +76,11 @@ public class ServerProxyAcceptorTest extends 
BaseTestSupport {
 
     @Test
     public void testClientAddressOverride() throws Exception {
-        final SshdSocketAddress expectedClientAddress = new 
SshdSocketAddress("7.3.6.5", 7365);
+        SshdSocketAddress expectedClientAddress = new 
SshdSocketAddress("7.3.6.5", 7365);
         String proxyMetadata = getCurrentTestName()
                                + " " + expectedClientAddress.getHostName()
                                + " " + expectedClientAddress.getPort();
-        final byte[] metaDataBytes = (proxyMetadata + 
IoUtils.EOL).getBytes(StandardCharsets.UTF_8);
+        byte[] metaDataBytes = (proxyMetadata + 
IoUtils.EOL).getBytes(StandardCharsets.UTF_8);
         sshd.setServerProxyAcceptor(new ServerProxyAcceptor() {
             private final AtomicInteger invocationCount = new AtomicInteger(0);
 
@@ -107,7 +107,7 @@ public class ServerProxyAcceptorTest extends 
BaseTestSupport {
             }
         });
 
-        final Semaphore sessionSignal = new Semaphore(0);
+        Semaphore sessionSignal = new Semaphore(0);
         sshd.addSessionListener(new SessionListener() {
             @Override
             public void sessionEvent(Session session, Event event) {
@@ -141,7 +141,7 @@ public class ServerProxyAcceptorTest extends 
BaseTestSupport {
             session.addPasswordIdentity(getCurrentTestName());
             session.auth().verify(AUTH_TIMEOUT);
             assertTrue("Failed to receive session signal on time",
-                    sessionSignal.tryAcquire(DEFAULT_TIMEOUT.toMillis(), 
TimeUnit.SECONDS));
+                    sessionSignal.tryAcquire(DEFAULT_TIMEOUT.toMillis(), 
TimeUnit.MILLISECONDS));
         } finally {
             client.stop();
         }

Reply via email to