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

tabish pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-protonj2.git


The following commit(s) were added to refs/heads/main by this push:
     new 67c2c04f PROTON-2628 Fix some minor test issues that cause instability
67c2c04f is described below

commit 67c2c04f2a9fe033d9d1762a9de65c3f9d60a601
Author: Timothy Bish <[email protected]>
AuthorDate: Wed Oct 19 16:58:01 2022 -0400

    PROTON-2628 Fix some minor test issues that cause instability
    
    Ensure driver is stopped before any new data arrives in cases where the
    test script has no additional expectations applied.  Also fix a test
    that should configure the test peer to be on TCP during a WS connection
    test.
---
 .../test/java/org/apache/qpid/protonj2/client/impl/ConnectionTest.java  | 1 +
 .../java/org/apache/qpid/protonj2/client/impl/WsConnectionTest.java     | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ConnectionTest.java
 
b/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ConnectionTest.java
index 5921f90b..a506cd74 100644
--- 
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ConnectionTest.java
+++ 
b/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ConnectionTest.java
@@ -391,6 +391,7 @@ public class ConnectionTest extends 
ImperativeClientTestCase {
     public void testCreateConnectionWithSASLDisabledToSASLEnabledHost() throws 
Exception {
         try (ProtonTestServer peer = new 
ProtonTestServer(testServerOptions())) {
             peer.expectAMQPHeader().respondWithSASLHeader();
+            peer.dropAfterLastHandler(); // Prevent any additional data to be 
parsed
             peer.start();
 
             URI remoteURI = peer.getServerURI();
diff --git 
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/WsConnectionTest.java
 
b/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/WsConnectionTest.java
index fb8b07aa..caa1546c 100644
--- 
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/WsConnectionTest.java
+++ 
b/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/WsConnectionTest.java
@@ -66,7 +66,7 @@ public class WsConnectionTest extends ConnectionTest {
 
     @Test
     public void testWSConnectFailsDueToServerListeningOverTCP() throws 
Exception {
-        try (ProtonTestServer peer = new 
ProtonTestServer(testServerOptions())) {
+        try (ProtonTestServer peer = new 
ProtonTestServer(testServerOptions().setUseWebSockets(false))) {
             peer.start();
 
             URI remoteURI = peer.getServerURI();


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to