Repository: mina-sshd
Updated Branches:
  refs/heads/master 65d7f65d1 -> b1464ecc1


Upgraded Spring version(s) to 5+


Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/b1464ecc
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/b1464ecc
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/b1464ecc

Branch: refs/heads/master
Commit: b1464ecc148947c369ffab8491d7f71985ae933b
Parents: 73b20e2
Author: Goldstein Lyor <[email protected]>
Authored: Wed Dec 20 13:50:36 2017 +0200
Committer: Goldstein Lyor <[email protected]>
Committed: Wed Dec 20 15:19:50 2017 +0200

----------------------------------------------------------------------
 pom.xml                                              |  2 +-
 .../apache/sshd/common/auth/AuthenticationTest.java  | 15 ++++++++++++++-
 sshd-spring-sftp/pom.xml                             |  2 +-
 3 files changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/b1464ecc/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f30ad1c..80f1b83 100644
--- a/pom.xml
+++ b/pom.xml
@@ -110,7 +110,7 @@
 
         <bouncycastle.version>1.58</bouncycastle.version>
         <slf4j.version>1.7.25</slf4j.version>
-        <spring.version>4.3.8.RELEASE</spring.version>
+        <spring.version>5.0.2.RELEASE</spring.version>
         <jgit.version>4.9.2.201712150930-r</jgit.version>
         <junit.version>4.12</junit.version>
         <surefire.plugin.version>2.20.1</surefire.plugin.version>

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/b1464ecc/sshd-core/src/test/java/org/apache/sshd/common/auth/AuthenticationTest.java
----------------------------------------------------------------------
diff --git 
a/sshd-core/src/test/java/org/apache/sshd/common/auth/AuthenticationTest.java 
b/sshd-core/src/test/java/org/apache/sshd/common/auth/AuthenticationTest.java
index 0f99de0..322f55c 100644
--- 
a/sshd-core/src/test/java/org/apache/sshd/common/auth/AuthenticationTest.java
+++ 
b/sshd-core/src/test/java/org/apache/sshd/common/auth/AuthenticationTest.java
@@ -32,6 +32,7 @@ import java.util.Map;
 import java.util.Objects;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicReference;
 
 import org.apache.sshd.client.SshClient;
 import org.apache.sshd.client.auth.hostbased.HostKeyIdentityProvider;
@@ -517,12 +518,20 @@ public class AuthenticationTest extends BaseTestSupport {
         try (SshClient client = setupTestClient()) {
             RuntimeException expected = new RuntimeException("Synthetic 
exception");
             AtomicInteger invocations = new AtomicInteger(0);
+            AtomicReference<Throwable> caughtException = new 
AtomicReference<>();
             client.addSessionListener(new SessionListener() {
                 @Override
                 public void sessionEvent(Session session, Event event) {
                     assertEquals("Mismatched invocations count", 1, 
invocations.incrementAndGet());
                     throw expected;
                 }
+
+                @Override
+                public void sessionException(Session session, Throwable t) {
+                    if (t == expected) {
+                        caughtException.set(t);
+                    }
+                }
             });
 
             client.start();
@@ -540,7 +549,11 @@ public class AuthenticationTest extends BaseTestSupport {
                 }
 
                 if (expected != actual) {
-                    fail("Mismatched authentication failure reason: 
signalled=" + signalled + ", actual=" + actual);
+                    // Possible race condition between session close and 
session exception signalled
+                    Throwable caught = caughtException.get();
+                    if (caught == null) {
+                        fail("Mismatched authentication failure reason: 
signalled=" + signalled + ", actual=" + actual);
+                    }
                 }
             } finally {
                 client.stop();

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/b1464ecc/sshd-spring-sftp/pom.xml
----------------------------------------------------------------------
diff --git a/sshd-spring-sftp/pom.xml b/sshd-spring-sftp/pom.xml
index 455878e..368307c 100644
--- a/sshd-spring-sftp/pom.xml
+++ b/sshd-spring-sftp/pom.xml
@@ -34,7 +34,7 @@
 
     <properties>
         <projectRoot>${basedir}/..</projectRoot>
-        <spring.integration.version>4.3.9.RELEASE</spring.integration.version>
+        <spring.integration.version>5.0.0.RELEASE</spring.integration.version>
     </properties>
 
     <dependencyManagement>

Reply via email to