From 375ea757dd235555c9245c20b906c91c2420e6e0 Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Fri, 20 Feb 2026 15:44:32 +0100 Subject: [PATCH] Fix RTSP server container startup --- .../main/java/io/openvidu/test/e2e/OpenViduTestE2e.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/openvidu-test-e2e/src/main/java/io/openvidu/test/e2e/OpenViduTestE2e.java b/openvidu-test-e2e/src/main/java/io/openvidu/test/e2e/OpenViduTestE2e.java index df618e31c..70cf2a746 100644 --- a/openvidu-test-e2e/src/main/java/io/openvidu/test/e2e/OpenViduTestE2e.java +++ b/openvidu-test-e2e/src/main/java/io/openvidu/test/e2e/OpenViduTestE2e.java @@ -184,7 +184,7 @@ public class OpenViduTestE2e { GenericContainer rtspServerContainer = new GenericContainer<>(DockerImageName.parse(RTSP_SERVER_IMAGE)) .withCreateContainerCmdModifier(cmd -> cmd.withName("rtsp-" + Math.random() * 100000)) - .withEnv(Map.of("MTX_LOGLEVEL", "info", "MTX_PROTOCOLS", "tcp", "MTX_RTSPADDRESS", ":" + RTSP_SRT_PORT, + .withEnv(Map.of("MTX_LOGLEVEL", "info", "MTX_RTSPTRANSPORTS", "tcp", "MTX_RTSPADDRESS", ":" + RTSP_SRT_PORT, "MTX_HLS", "no", "MTX_RTSP", "yes", "MTX_WEBRTC", "yes", "MTX_SRT", "no", "MTX_RTMP", "no", "MTX_API", "no")) .withNetworkMode("host") @@ -214,15 +214,14 @@ public class OpenViduTestE2e { ffmpegPublishContainer.start(); containers.add(ffmpegPublishContainer); + // e.g. "[path live] stream is available and online, 2 tracks (H264, Opus)" if (videoCodec != null) { - String regex = ".*is publishing to path '" + RTSP_PATH + "'[^\\n]*\\([^\\n]*(?i)(" + videoCodec - + ")[^\\n]*\\)\\n"; + String regex = ".*\\[path " + RTSP_PATH + "\\] stream is available.*\\(.*(?i)(" + videoCodec + ").*\\).*"; waitUntilLog(rtspServerContainer, regex, 15); } if (audioCodec != null) { String expectedValue = FFMPEG_AUDIO_CODEC_NAMES.get(audioCodec).getRight(); - String regex = ".*is publishing to path '" + RTSP_PATH + "'[^\\n]*\\([^\\n]*(?i)(" + expectedValue - + ")[^\\n]*\\)\\n"; + String regex = ".*\\[path " + RTSP_PATH + "\\] stream is available.*\\(.*(?i)(" + expectedValue + ").*\\).*"; waitUntilLog(rtspServerContainer, regex, 15); }