You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2021/04/07 16:18:40 UTC

[tomcat] branch 8.5.x updated: Switch test to use localhost as possible fix for CI instability

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

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
     new 63a9470  Switch test to use localhost as possible fix for CI instability
63a9470 is described below

commit 63a947041c9ae5a620a15a396c044ace908d4f87
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Apr 7 17:17:38 2021 +0100

    Switch test to use localhost as possible fix for CI instability
---
 .../org/apache/catalina/session/TestStandardSessionIntegration.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/session/TestStandardSessionIntegration.java b/test/org/apache/catalina/session/TestStandardSessionIntegration.java
index 553cc48..a69c993 100644
--- a/test/org/apache/catalina/session/TestStandardSessionIntegration.java
+++ b/test/org/apache/catalina/session/TestStandardSessionIntegration.java
@@ -32,6 +32,8 @@ import org.apache.catalina.Context;
 import org.apache.catalina.ha.tcp.SimpleTcpCluster;
 import org.apache.catalina.startup.Tomcat;
 import org.apache.catalina.startup.TomcatBaseTest;
+import org.apache.catalina.tribes.group.GroupChannel;
+import org.apache.catalina.tribes.transport.ReceiverBase;
 import org.apache.tomcat.util.buf.ByteChunk;
 
 public class TestStandardSessionIntegration extends TomcatBaseTest {
@@ -60,7 +62,9 @@ public class TestStandardSessionIntegration extends TomcatBaseTest {
         ctx.addServletMappingDecoded("/bug56578", "bug56578");
 
         if (useClustering) {
-            tomcat.getEngine().setCluster(new SimpleTcpCluster());
+            SimpleTcpCluster cluster = new SimpleTcpCluster();
+            ((ReceiverBase) ((GroupChannel) cluster.getChannel()).getChannelReceiver()).setHost("localhost");
+            tomcat.getEngine().setCluster(cluster);
             ctx.setDistributable(true);
             ctx.setManager(ctx.getCluster().createManager(""));
         }

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org