diff --git a/ci-scripts/openvidu-e2e-tests.sh b/ci-scripts/openvidu-e2e-tests.sh index c7e1b38a35..24379e4d74 100755 --- a/ci-scripts/openvidu-e2e-tests.sh +++ b/ci-scripts/openvidu-e2e-tests.sh @@ -49,6 +49,7 @@ function environmentLaunch { fi done elif [[ "${MEDIA_SERVER}" == "mediasoup" ]]; then + LOG_DATE=$(printf '%(%Y-%m-%d-%H:%M:%S)T') docker run --network=host --restart=always --detach=true \ --env=KMS_MIN_PORT=40000 \ --env=KMS_MAX_PORT=65535 \ @@ -57,7 +58,7 @@ function environmentLaunch { --env=WEBRTC_LISTENIPS_0_ANNOUNCEDIP="${DOCKER_HOST_IP}" \ --env=WEBRTC_LISTENIPS_0_IP="${DOCKER_HOST_IP}" \ --volume=/opt/openvidu/recordings:/opt/openvidu/recordings \ - openvidu/mediasoup-controller:"${MEDIASOUP_CONTROLLER_VERSION}" + openvidu/mediasoup-controller:"${MEDIASOUP_CONTROLLER_VERSION} >& /opt/openvidu/mediasoup-controller-${LOG_DATE}.log" until $(curl --insecure --output /dev/null --silent http://${DOCKER_HOST_IP}:8888/kurento); do echo "Waiting for ${MEDIA_SERVER}..." sleep 1 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 31c26ea39e..6c6422c9b5 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 @@ -638,11 +638,11 @@ protected void startMediaServer(boolean waitUntilKurentoClientReconnection) { + " --volume=/opt/openvidu/recordings:/opt/openvidu/recordings " + MEDIA_SERVER_IMAGE; } else if (MEDIA_SERVER_IMAGE.startsWith(MEDIASOUP_IMAGE)) { log.info("Starting mediaSoup"); - command = "docker run --network=host --restart=always --detach=true --env=KMS_MIN_PORT=40000 --env=KMS_MAX_PORT=65535" + command = "LOG_DATE=$(printf '%(%Y-%m-%d-%H:%M:%S)T'); docker run --network=host --restart=always --detach=true --env=KMS_MIN_PORT=40000 --env=KMS_MAX_PORT=65535" + " --env=OPENVIDU_PRO_LICENSE=" + OPENVIDU_PRO_LICENSE + " --env=OPENVIDU_PRO_LICENSE_API=" + OPENVIDU_PRO_LICENSE_API + " --env=WEBRTC_LISTENIPS_0_ANNOUNCEDIP=172.17.0.1 --env=WEBRTC_LISTENIPS_0_IP=172.17.0.1" - + " --volume=/opt/openvidu/recordings:/opt/openvidu/recordings " + MEDIA_SERVER_IMAGE; + + " --volume=/opt/openvidu/recordings:/opt/openvidu/recordings " + MEDIA_SERVER_IMAGE + " >& /opt/openvidu/mediasoup-controller-${LOG_DATE}.log"; } else { log.error("Unrecognized MEDIA_SERVER_IMAGE: {}", MEDIA_SERVER_IMAGE); System.exit(1);