Issue #7034 infinispan flaky tests on CI, force TCP over UDP for jgroups multicasting as it is too slow with kubernetes (#7122)

Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
This commit is contained in:
Olivier Lamy 2021-11-17 15:50:22 +10:00 committed by GitHub
parent aa5da31938
commit 4868ed0acd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 25 additions and 3 deletions

View File

@ -42,6 +42,7 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.testcontainers.containers.BindMode;
import org.testcontainers.containers.GenericContainer; import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.output.Slf4jLogConsumer; import org.testcontainers.containers.output.Slf4jLogConsumer;
import org.testcontainers.containers.wait.strategy.LogMessageWaitStrategy; import org.testcontainers.containers.wait.strategy.LogMessageWaitStrategy;
@ -74,10 +75,12 @@ public class RemoteQueryManagerTest
.withEnv("PASS", "foobar") .withEnv("PASS", "foobar")
.withEnv("MGMT_USER", "admin") .withEnv("MGMT_USER", "admin")
.withEnv("MGMT_PASS", "admin") .withEnv("MGMT_PASS", "admin")
.withEnv("CONFIG_PATH", "/user-config/config.yaml")
.waitingFor(new LogMessageWaitStrategy() .waitingFor(new LogMessageWaitStrategy()
.withRegEx(".*Infinispan Server.*started in.*\\s")) .withRegEx(".*Infinispan Server.*started in.*\\s"))
.withExposedPorts(4712, 4713, 8088, 8089, 8443, 9990, 9993, 11211, 11222, 11223, 11224) .withExposedPorts(4712, 4713, 8088, 8089, 8443, 9990, 9993, 11211, 11222, 11223, 11224)
.withLogConsumer(new Slf4jLogConsumer(INFINISPAN_LOG)); .withLogConsumer(new Slf4jLogConsumer(INFINISPAN_LOG))
.withClasspathResourceMapping("/config.yaml", "/user-config/config.yaml", BindMode.READ_ONLY);
@BeforeEach @BeforeEach
public void setup() throws Exception public void setup() throws Exception

View File

@ -0,0 +1,4 @@
jgroups:
transport: tcp
dnsPing:
query: infinispan-dns-ping.myproject.svc.cluster.local

View File

@ -34,6 +34,7 @@ import org.infinispan.commons.configuration.XMLStringConfiguration;
import org.infinispan.commons.marshall.ProtoStreamMarshaller; import org.infinispan.commons.marshall.ProtoStreamMarshaller;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.testcontainers.containers.BindMode;
import org.testcontainers.containers.GenericContainer; import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.output.Slf4jLogConsumer; import org.testcontainers.containers.output.Slf4jLogConsumer;
import org.testcontainers.containers.wait.strategy.LogMessageWaitStrategy; import org.testcontainers.containers.wait.strategy.LogMessageWaitStrategy;
@ -64,10 +65,12 @@ public class InfinispanSessionDistributionTests extends AbstractSessionDistribut
.withEnv("PASS", "foobar") .withEnv("PASS", "foobar")
.withEnv("MGMT_USER", "admin") .withEnv("MGMT_USER", "admin")
.withEnv("MGMT_PASS", "admin") .withEnv("MGMT_PASS", "admin")
.withEnv("CONFIG_PATH", "/user-config/config.yaml")
.waitingFor(new LogMessageWaitStrategy() .waitingFor(new LogMessageWaitStrategy()
.withRegEx(".*Infinispan Server.*started in.*\\s")) .withRegEx(".*Infinispan Server.*started in.*\\s"))
.withExposedPorts(4712, 4713, 8088, 8089, 8443, 9990, 9993, 11211, 11222, 11223, 11224) .withExposedPorts(4712, 4713, 8088, 8089, 8443, 9990, 9993, 11211, 11222, 11223, 11224)
.withLogConsumer(new Slf4jLogConsumer(INFINISPAN_LOG)); .withLogConsumer(new Slf4jLogConsumer(INFINISPAN_LOG))
.withClasspathResourceMapping("/config.yaml", "/user-config/config.yaml", BindMode.READ_ONLY);
infinispan.start(); infinispan.start();
host = infinispan.getContainerIpAddress(); host = infinispan.getContainerIpAddress();
port = infinispan.getMappedPort(11222); port = infinispan.getMappedPort(11222);

View File

@ -0,0 +1,4 @@
jgroups:
transport: tcp
dnsPing:
query: infinispan-dns-ping.myproject.svc.cluster.local

View File

@ -34,6 +34,7 @@ import org.infinispan.commons.configuration.XMLStringConfiguration;
import org.infinispan.commons.marshall.ProtoStreamMarshaller; import org.infinispan.commons.marshall.ProtoStreamMarshaller;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.testcontainers.containers.BindMode;
import org.testcontainers.containers.GenericContainer; import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.output.Slf4jLogConsumer; import org.testcontainers.containers.output.Slf4jLogConsumer;
import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.containers.wait.strategy.Wait;
@ -62,9 +63,11 @@ public class RemoteInfinispanTestSupport
.withEnv("PASS", "foobar") .withEnv("PASS", "foobar")
.withEnv("MGMT_USER", "admin") .withEnv("MGMT_USER", "admin")
.withEnv("MGMT_PASS", "admin") .withEnv("MGMT_PASS", "admin")
.withEnv("CONFIG_PATH", "/user-config/config.yaml")
.waitingFor(Wait.forLogMessage(".*Infinispan Server.*started in.*\\s", 1)) .waitingFor(Wait.forLogMessage(".*Infinispan Server.*started in.*\\s", 1))
.withExposedPorts(4712, 4713, 8088, 8089, 8443, 9990, 9993, 11211, 11222, 11223, 11224) .withExposedPorts(4712, 4713, 8088, 8089, 8443, 9990, 9993, 11211, 11222, 11223, 11224)
.withLogConsumer(new Slf4jLogConsumer(INFINISPAN_LOG)); .withLogConsumer(new Slf4jLogConsumer(INFINISPAN_LOG))
.withClasspathResourceMapping("/config.yaml", "/user-config/config.yaml", BindMode.READ_ONLY);
private static final String INFINISPAN_VERSION = System.getProperty("infinispan.docker.image.version", "11.0.9.Final"); private static final String INFINISPAN_VERSION = System.getProperty("infinispan.docker.image.version", "11.0.9.Final");

View File

@ -0,0 +1,4 @@
jgroups:
transport: tcp
dnsPing:
query: infinispan-dns-ping.myproject.svc.cluster.local

View File

@ -1,4 +1,5 @@
org.slf4j.simpleLogger.defaultLogLevel=info org.slf4j.simpleLogger.defaultLogLevel=info
org.slf4j.simpleLogger.showDateTime=true
org.slf4j.simpleLogger.log.org.eclipse.jetty.server.session.remote.infinispanLogs=info org.slf4j.simpleLogger.log.org.eclipse.jetty.server.session.remote.infinispanLogs=info
org.slf4j.simpleLogger.log.org.eclipse.jetty.server.session.remote.RemoteInfinispanTestSupport=info org.slf4j.simpleLogger.log.org.eclipse.jetty.server.session.remote.RemoteInfinispanTestSupport=info
#org.slf4j.simpleLogger.log.org.eclipse.jetty.server.session=trace #org.slf4j.simpleLogger.log.org.eclipse.jetty.server.session=trace