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

elecharny pushed a commit to branch 2.0.X
in repository https://gitbox.apache.org/repos/asf/mina.git


The following commit(s) were added to refs/heads/2.0.X by this push:
     new 5bf582a  Applied a 2.1 patch
5bf582a is described below

commit 5bf582a95aa904f3aa723fea88dd94001f788ce9
Author: emmanuel lecharny <elecha...@apache.org>
AuthorDate: Wed Feb 9 07:56:51 2022 +0100

    Applied a 2.1 patch
---
 .../mina/example/echoserver/ConnectorTest.java     | 32 +---------------------
 1 file changed, 1 insertion(+), 31 deletions(-)

diff --git 
a/mina-example/src/test/java/org/apache/mina/example/echoserver/ConnectorTest.java
 
b/mina-example/src/test/java/org/apache/mina/example/echoserver/ConnectorTest.java
index 8f3163f..c530463 100644
--- 
a/mina-example/src/test/java/org/apache/mina/example/echoserver/ConnectorTest.java
+++ 
b/mina-example/src/test/java/org/apache/mina/example/echoserver/ConnectorTest.java
@@ -20,7 +20,6 @@
 package org.apache.mina.example.echoserver;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 import java.net.InetAddress;
@@ -39,7 +38,6 @@ import 
org.apache.mina.transport.socket.nio.NioDatagramConnector;
 import org.apache.mina.transport.socket.nio.NioSocketConnector;
 import org.apache.mina.util.AvailablePortFinder;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -81,7 +79,6 @@ public class ConnectorTest extends AbstractTest {
     }
 
     @Test
-    @Ignore
     public void testTCPWithSSL() throws Exception {
         useSSL = true;
         // Create a connector
@@ -135,34 +132,7 @@ public class ConnectorTest extends AbstractTest {
 
         // Send closeNotify to test TLS closure if it is TLS connection.
         if (useSSL) {
-            connectorSSLFilter.stopSsl(session).awaitUninterruptibly();
-
-            System.out
-                    
.println("-------------------------------------------------------------------------------");
-            // Test again after we finished TLS session.
-            testConnector0(session);
-
-            System.out
-                    
.println("-------------------------------------------------------------------------------");
-
-            // Test if we can enter TLS mode again.
-            //// Send StartTLS request.
-            handler.readBuf.clear();
-            IoBuffer buf = IoBuffer.allocate(1);
-            buf.put((byte) '.');
-            buf.flip();
-            session.write(buf).awaitUninterruptibly();
-
-            //// Wait for StartTLS response.
-            waitForResponse(handler, 1);
-
-            handler.readBuf.flip();
-            assertEquals(1, handler.readBuf.remaining());
-            assertEquals((byte) '.', handler.readBuf.get());
-
-            // Now start TLS connection
-            assertTrue(connectorSSLFilter.startSsl(session));
-            testConnector0(session);
+            session.getFilterChain().remove("SSL");
         }
 
         session.closeNow().awaitUninterruptibly();

Reply via email to