You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by gn...@apache.org on 2018/04/18 08:22:42 UTC

mina-sshd git commit: Fix tests using the wrong IO provider

Repository: mina-sshd
Updated Branches:
  refs/heads/master 04c579408 -> fbbefe1e6


Fix tests using the wrong IO provider


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

Branch: refs/heads/master
Commit: fbbefe1e6aa1dd92f3953ef3d0f33cee3d482ca6
Parents: 04c5794
Author: Guillaume Nodet <gn...@apache.org>
Authored: Wed Apr 18 10:19:11 2018 +0200
Committer: Guillaume Nodet <gn...@apache.org>
Committed: Wed Apr 18 10:19:11 2018 +0200

----------------------------------------------------------------------
 .../apache/sshd/util/test/BaseTestSupport.java  | 10 +++++++++-
 sshd-git/pom.xml                                |  4 ++--
 sshd-mina/pom.xml                               |  3 ++-
 ...pache.sshd.common.io.IoServiceFactoryFactory | 20 --------------------
 ...pache.sshd.common.io.IoServiceFactoryFactory | 20 ++++++++++++++++++++
 sshd-sftp/pom.xml                               |  4 ++--
 6 files changed, 35 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/fbbefe1e/sshd-core/src/test/java/org/apache/sshd/util/test/BaseTestSupport.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/test/java/org/apache/sshd/util/test/BaseTestSupport.java b/sshd-core/src/test/java/org/apache/sshd/util/test/BaseTestSupport.java
index 2263217..87dd4e6 100644
--- a/sshd-core/src/test/java/org/apache/sshd/util/test/BaseTestSupport.java
+++ b/sshd-core/src/test/java/org/apache/sshd/util/test/BaseTestSupport.java
@@ -52,6 +52,8 @@ import java.util.Objects;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.sshd.client.SshClient;
+import org.apache.sshd.common.io.DefaultIoServiceFactoryFactory;
+import org.apache.sshd.common.io.IoServiceFactoryFactory;
 import org.apache.sshd.common.keyprovider.KeyPairProvider;
 import org.apache.sshd.common.util.GenericUtils;
 import org.apache.sshd.common.util.io.IoUtils;
@@ -95,7 +97,13 @@ public abstract class BaseTestSupport extends Assert {
 
         @Override
         protected void starting(Description description) {
-            System.out.println("\nStarting " + description.getClassName() + ":" + description.getMethodName() + "...\n");
+            System.out.println("\nStarting " + description.getClassName() + ":" + description.getMethodName() + "...");
+            try {
+                System.out.println("Using provider: " + DefaultIoServiceFactoryFactory.newInstance(IoServiceFactoryFactory.class).getClass().getName());
+            } catch (Throwable t) {
+                // Ignore
+            }
+            System.out.println();
             startTime = System.currentTimeMillis();
         }
 

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/fbbefe1e/sshd-git/pom.xml
----------------------------------------------------------------------
diff --git a/sshd-git/pom.xml b/sshd-git/pom.xml
index abae18f..529744f 100644
--- a/sshd-git/pom.xml
+++ b/sshd-git/pom.xml
@@ -113,7 +113,7 @@
                     <redirectTestOutputToFile>true</redirectTestOutputToFile>
                     <reportsDirectory>${project.build.directory}/surefire-reports-nio2</reportsDirectory>
                     <systemProperties>
-                        <org.apache.sshd.common.io.IoServiceFactory>org.apache.sshd.common.io.nio2.Nio2ServiceFactory</org.apache.sshd.common.io.IoServiceFactory>
+                        <org.apache.sshd.common.io.IoServiceFactoryFactory>org.apache.sshd.common.io.nio2.Nio2ServiceFactoryFactory</org.apache.sshd.common.io.IoServiceFactoryFactory>
                     </systemProperties>
                 </configuration>
             </plugin>
@@ -158,7 +158,7 @@
                                     <redirectTestOutputToFile>true</redirectTestOutputToFile>
                                     <reportsDirectory>${project.build.directory}/surefire-reports-mina</reportsDirectory>
                                     <systemProperties>
-                                        <org.apache.sshd.common.io.IoServiceFactory>org.apache.sshd.common.io.mina.MinaServiceFactory</org.apache.sshd.common.io.IoServiceFactory>
+                                        <org.apache.sshd.common.io.IoServiceFactoryFactory>org.apache.sshd.common.io.mina.MinaServiceFactoryFactory</org.apache.sshd.common.io.IoServiceFactoryFactory>
                                     </systemProperties>
                                 </configuration>
                             </execution>

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/fbbefe1e/sshd-mina/pom.xml
----------------------------------------------------------------------
diff --git a/sshd-mina/pom.xml b/sshd-mina/pom.xml
index 71ada5a..5f0588f 100644
--- a/sshd-mina/pom.xml
+++ b/sshd-mina/pom.xml
@@ -164,7 +164,7 @@
                     <redirectTestOutputToFile>true</redirectTestOutputToFile>
                     <reportsDirectory>${project.build.directory}/surefire-reports-mina</reportsDirectory>
                     <systemProperties>
-                        <org.apache.sshd.common.io.IoServiceFactory>org.apache.sshd.common.io.mina.MinaServiceFactory</org.apache.sshd.common.io.IoServiceFactory>
+                        <org.apache.sshd.common.io.IoServiceFactoryFactory>org.apache.sshd.common.io.mina.MinaServiceFactoryFactory</org.apache.sshd.common.io.IoServiceFactoryFactory>
                     </systemProperties>
                     <excludes>
                             <!-- These tests use NIO explicitly -->
@@ -179,6 +179,7 @@
                         <exclude>**/PortForwardingTest.java</exclude>
                         <exclude>**/MacTest.java</exclude>
                         <exclude>**/SpringConfigTest.java</exclude>
+                        <exclude>**/ConcurrentConnectionTest.java</exclude>
                     </excludes>
                         <!-- No need to re-run core tests that do not involve session creation -->
                     <excludedGroups>org.apache.sshd.util.test.NoIoTestCase</excludedGroups>

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/fbbefe1e/sshd-mina/src/main/filtered-resources/META-INF/services/org.apache.sshd.common.io.IoServiceFactoryFactory
----------------------------------------------------------------------
diff --git a/sshd-mina/src/main/filtered-resources/META-INF/services/org.apache.sshd.common.io.IoServiceFactoryFactory b/sshd-mina/src/main/filtered-resources/META-INF/services/org.apache.sshd.common.io.IoServiceFactoryFactory
deleted file mode 100644
index b842d2f..0000000
--- a/sshd-mina/src/main/filtered-resources/META-INF/services/org.apache.sshd.common.io.IoServiceFactoryFactory
+++ /dev/null
@@ -1,20 +0,0 @@
-##
-## Licensed to the Apache Software Foundation (ASF) under one
-## or more contributor license agreements.  See the NOTICE file
-## distributed with this work for additional information
-## regarding copyright ownership.  The ASF licenses this file
-## to you under the Apache License, Version 2.0 (the
-## "License"); you may not use this file except in compliance
-## with the License.  You may obtain a copy of the License at
-##
-##  http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing,
-## software distributed under the License is distributed on an
-## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-## KIND, either express or implied.  See the License for the
-## specific language governing permissions and limitations
-## under the License.
-##
-
-org.apache.sshd.common.io.mina.MinaServiceFactoryFactory

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/fbbefe1e/sshd-mina/src/main/resources/META-INF/services/org.apache.sshd.common.io.IoServiceFactoryFactory
----------------------------------------------------------------------
diff --git a/sshd-mina/src/main/resources/META-INF/services/org.apache.sshd.common.io.IoServiceFactoryFactory b/sshd-mina/src/main/resources/META-INF/services/org.apache.sshd.common.io.IoServiceFactoryFactory
new file mode 100644
index 0000000..b842d2f
--- /dev/null
+++ b/sshd-mina/src/main/resources/META-INF/services/org.apache.sshd.common.io.IoServiceFactoryFactory
@@ -0,0 +1,20 @@
+##
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License.  You may obtain a copy of the License at
+##
+##  http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied.  See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+
+org.apache.sshd.common.io.mina.MinaServiceFactoryFactory

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/fbbefe1e/sshd-sftp/pom.xml
----------------------------------------------------------------------
diff --git a/sshd-sftp/pom.xml b/sshd-sftp/pom.xml
index cc52367..e36d6ba 100644
--- a/sshd-sftp/pom.xml
+++ b/sshd-sftp/pom.xml
@@ -98,7 +98,7 @@
                     <redirectTestOutputToFile>true</redirectTestOutputToFile>
                     <reportsDirectory>${project.build.directory}/surefire-reports-nio2</reportsDirectory>
                     <systemProperties>
-                        <org.apache.sshd.common.io.IoServiceFactory>org.apache.sshd.common.io.nio2.Nio2ServiceFactory</org.apache.sshd.common.io.IoServiceFactory>
+                        <org.apache.sshd.common.io.IoServiceFactoryFactory>org.apache.sshd.common.io.nio2.Nio2ServiceFactoryFactory</org.apache.sshd.common.io.IoServiceFactoryFactory>
                     </systemProperties>
                 </configuration>
             </plugin>
@@ -143,7 +143,7 @@
                                     <redirectTestOutputToFile>true</redirectTestOutputToFile>
 				                    <reportsDirectory>${project.build.directory}/surefire-reports-mina</reportsDirectory>
 				                    <systemProperties>
-				                        <org.apache.sshd.common.io.IoServiceFactory>org.apache.sshd.common.io.mina.MinaServiceFactory</org.apache.sshd.common.io.IoServiceFactory>
+				                        <org.apache.sshd.common.io.IoServiceFactoryFactory>org.apache.sshd.common.io.mina.MinaServiceFactoryFactory</org.apache.sshd.common.io.IoServiceFactoryFactory>
 				                    </systemProperties>
                                 </configuration>
                             </execution>