diff --git a/NodeBase/start-selenium-node.sh b/NodeBase/start-selenium-node.sh index 65402cbec..cae651a35 100755 --- a/NodeBase/start-selenium-node.sh +++ b/NodeBase/start-selenium-node.sh @@ -36,6 +36,21 @@ if [ ! -z "$SE_NODE_SESSION_TIMEOUT" ]; then SE_OPTS="$SE_OPTS --session-timeout ${SE_NODE_SESSION_TIMEOUT}" fi +if [ ! -z "$SE_NODE_ENABLE_MANAGED_DOWNLOADS" ]; then + echo "Appending Selenium options: --enable-managed-downloads ${SE_NODE_ENABLE_MANAGED_DOWNLOADS}" + SE_OPTS="$SE_OPTS --enable-managed-downloads ${SE_NODE_ENABLE_MANAGED_DOWNLOADS}" +fi + +if [ ! -z "$SE_NODE_ENABLE_CDP" ]; then + echo "Appending Selenium options: --enable-cdp ${SE_NODE_ENABLE_CDP}" + SE_OPTS="$SE_OPTS --enable-cdp ${SE_NODE_ENABLE_CDP}" +fi + +if [ ! -z "$SE_NODE_REGISTER_PERIOD" ]; then + echo "Appending Selenium options: --register-period ${SE_NODE_REGISTER_PERIOD}" + SE_OPTS="$SE_OPTS --register-period ${SE_NODE_REGISTER_PERIOD}" +fi + if [ ! -z "$SE_LOG_LEVEL" ]; then echo "Appending Selenium options: --log-level ${SE_LOG_LEVEL}" SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}" diff --git a/Standalone/start-selenium-standalone.sh b/Standalone/start-selenium-standalone.sh index aa02ae06f..04e46806b 100755 --- a/Standalone/start-selenium-standalone.sh +++ b/Standalone/start-selenium-standalone.sh @@ -11,6 +11,21 @@ if [ ! -z "$SE_OPTS" ]; then echo "Appending Selenium options: ${SE_OPTS}" fi +if [ ! -z "$SE_NODE_ENABLE_MANAGED_DOWNLOADS" ]; then + echo "Appending Selenium options: --enable-managed-downloads ${SE_NODE_ENABLE_MANAGED_DOWNLOADS}" + SE_OPTS="$SE_OPTS --enable-managed-downloads ${SE_NODE_ENABLE_MANAGED_DOWNLOADS}" +fi + +if [ ! -z "$SE_NODE_ENABLE_CDP" ]; then + echo "Appending Selenium options: --enable-cdp ${SE_NODE_ENABLE_CDP}" + SE_OPTS="$SE_OPTS --enable-cdp ${SE_NODE_ENABLE_CDP}" +fi + +if [ ! -z "$SE_NODE_REGISTER_PERIOD" ]; then + echo "Appending Selenium options: --register-period ${SE_NODE_REGISTER_PERIOD}" + SE_OPTS="$SE_OPTS --register-period ${SE_NODE_REGISTER_PERIOD}" +fi + if [ ! -z "$SE_LOG_LEVEL" ]; then echo "Appending Selenium options: --log-level ${SE_LOG_LEVEL}" SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}" diff --git a/docker-compose-v3-video-upload.yml b/docker-compose-v3-video-upload.yml index fbeca1ef7..f0d80aabe 100644 --- a/docker-compose-v3-video-upload.yml +++ b/docker-compose-v3-video-upload.yml @@ -13,7 +13,6 @@ services: - SE_EVENT_BUS_HOST=selenium-hub - SE_EVENT_BUS_PUBLISH_PORT=4442 - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 - - SE_OPTS=--enable-managed-downloads true edge: image: selenium/node-edge:nightly @@ -24,7 +23,6 @@ services: - SE_EVENT_BUS_HOST=selenium-hub - SE_EVENT_BUS_PUBLISH_PORT=4442 - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 - - SE_OPTS=--enable-managed-downloads true firefox: image: selenium/node-firefox:nightly @@ -35,7 +33,6 @@ services: - SE_EVENT_BUS_HOST=selenium-hub - SE_EVENT_BUS_PUBLISH_PORT=4442 - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 - - SE_OPTS=--enable-managed-downloads true chrome_video: image: selenium/video:nightly diff --git a/tests/SeleniumTests/__init__.py b/tests/SeleniumTests/__init__.py index bd2f1e4e5..c469d68ba 100644 --- a/tests/SeleniumTests/__init__.py +++ b/tests/SeleniumTests/__init__.py @@ -159,16 +159,18 @@ def run(self, test_classes): print(traceback.format_exc()) print(f"{str(test)} failed with exception: {str(e)}") print(f"Original exception: {e.__cause__}") - print(f"Number of failed tests: {len(failed_tests)}") - for test in failed_tests: - try: - print(f"Rerunning test: {str(test)}") - test.run() - except Exception as e: - print(traceback.format_exc()) - print(f"Test {str(test)} failed again with exception: {str(e)}") - print(f"Original exception: {e.__cause__}") - raise Exception(f"Rerun test failed: {str(test)} failed with exception: {str(e)}") + if len(failed_tests) > 0: + print(f"Number of failed tests: {len(failed_tests)}. Going to rerun!") + for test in failed_tests: + try: + print(f"Rerunning test: {str(test)}") + test.run() + except Exception as e: + print(traceback.format_exc()) + print(f"Test {str(test)} failed again with exception: {str(e)}") + print(f"Original exception: {e.__cause__}") + raise Exception(f"Rerun test failed: {str(test)} failed with exception: {str(e)}") + print(f"::warning:: Number of failed tests: {len(failed_tests)}. All tests passed in rerun!") class DeploymentAutoscalingTests(unittest.TestCase): def test_parallel_autoscaling(self): diff --git a/tests/charts/ci/DeploymentAutoscaling-values.yaml b/tests/charts/ci/DeploymentAutoscaling-values.yaml index 8e26fc808..f249d96b2 100644 --- a/tests/charts/ci/DeploymentAutoscaling-values.yaml +++ b/tests/charts/ci/DeploymentAutoscaling-values.yaml @@ -35,8 +35,8 @@ chromeNode: # NodePort will be assigned randomly if not set nameOverride: my-chrome-name extraEnvironmentVariables: &extraEnvironmentVariables - - name: SE_OPTS - value: "--enable-managed-downloads true" + - name: SE_NODE_ENABLE_MANAGED_DOWNLOADS + value: "true" - name: SE_VNC_NO_PASSWORD value: "true" - name: SE_SCREEN_WIDTH diff --git a/tests/charts/ci/JobAutoscaling-values.yaml b/tests/charts/ci/JobAutoscaling-values.yaml index 248c2f7cc..475ee9a07 100644 --- a/tests/charts/ci/JobAutoscaling-values.yaml +++ b/tests/charts/ci/JobAutoscaling-values.yaml @@ -15,8 +15,8 @@ autoscaling: chromeNode: nameOverride: my-chrome-name extraEnvironmentVariables: &extraEnvironmentVariables - - name: SE_OPTS - value: "--enable-managed-downloads true" + - name: SE_NODE_ENABLE_MANAGED_DOWNLOADS + value: "true" - name: SE_VNC_NO_PASSWORD value: "true" - name: SE_SCREEN_WIDTH diff --git a/tests/charts/ci/NodeChrome-values.yaml b/tests/charts/ci/NodeChrome-values.yaml index d7c9df098..5a612e0e6 100644 --- a/tests/charts/ci/NodeChrome-values.yaml +++ b/tests/charts/ci/NodeChrome-values.yaml @@ -4,8 +4,8 @@ chromeNode: port: 6666 nameOverride: my-chrome-name extraEnvironmentVariables: - - name: SE_OPTS - value: "--enable-managed-downloads true" + - name: SE_NODE_ENABLE_MANAGED_DOWNLOADS + value: "true" # Configuration for edge nodes edgeNode: enabled: false diff --git a/tests/charts/ci/NodeEdge-values.yaml b/tests/charts/ci/NodeEdge-values.yaml index 7c78ccbe7..3fdc12a6d 100644 --- a/tests/charts/ci/NodeEdge-values.yaml +++ b/tests/charts/ci/NodeEdge-values.yaml @@ -7,8 +7,8 @@ edgeNode: port: 8888 nameOverride: my-edge-name extraEnvironmentVariables: - - name: SE_OPTS - value: "--enable-managed-downloads true" + - name: SE_NODE_ENABLE_MANAGED_DOWNLOADS + value: "true" # Configuration for firefox nodes firefoxNode: enabled: false diff --git a/tests/charts/ci/NodeFirefox-values.yaml b/tests/charts/ci/NodeFirefox-values.yaml index 72cce27c5..574ce19e3 100644 --- a/tests/charts/ci/NodeFirefox-values.yaml +++ b/tests/charts/ci/NodeFirefox-values.yaml @@ -10,5 +10,5 @@ firefoxNode: port: 7777 nameOverride: my-firefox-name extraEnvironmentVariables: - - name: SE_OPTS - value: "--enable-managed-downloads true" + - name: SE_NODE_ENABLE_MANAGED_DOWNLOADS + value: "true" diff --git a/tests/charts/refValues/sample-aws.yaml b/tests/charts/refValues/sample-aws.yaml index 097eb4277..2112f34de 100644 --- a/tests/charts/refValues/sample-aws.yaml +++ b/tests/charts/refValues/sample-aws.yaml @@ -58,8 +58,8 @@ chromeNode: value: "300" - name: SE_VNC_NO_PASSWORD value: "true" - - name: SE_OPTS - value: "--enable-managed-downloads true" + - name: SE_NODE_ENABLE_MANAGED_DOWNLOADS + value: "true" firefoxNode: extraEnvironmentVariables: *extraEnvironmentVariablesNodes diff --git a/tests/charts/refValues/simplex-minikube.yaml b/tests/charts/refValues/simplex-minikube.yaml index 3541ac2db..2708aa1cd 100644 --- a/tests/charts/refValues/simplex-minikube.yaml +++ b/tests/charts/refValues/simplex-minikube.yaml @@ -73,8 +73,8 @@ chromeNode: value: "300" - name: SE_VNC_NO_PASSWORD value: "true" - - name: SE_OPTS - value: "--enable-managed-downloads true" + - name: SE_NODE_ENABLE_MANAGED_DOWNLOADS + value: "true" firefoxNode: extraEnvironmentVariables: *extraEnvironmentVariablesNodes diff --git a/tests/docker-compose-v3-test-video.yml b/tests/docker-compose-v3-test-video.yml index 2b14e09e3..308bbcfce 100644 --- a/tests/docker-compose-v3-test-video.yml +++ b/tests/docker-compose-v3-test-video.yml @@ -13,7 +13,7 @@ services: - SE_EVENT_BUS_HOST=selenium-hub - SE_EVENT_BUS_PUBLISH_PORT=4442 - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 - - SE_OPTS=--enable-managed-downloads true + - SE_NODE_ENABLE_MANAGED_DOWNLOADS=true ports: - "6900:5900" diff --git a/tests/test.py b/tests/test.py index 5482c0a89..f637767e5 100644 --- a/tests/test.py +++ b/tests/test.py @@ -141,7 +141,7 @@ def launch_container(container, **kwargs): 'SE_EVENT_BUS_SUBSCRIBE_PORT': 4443 } if container != 'Hub': - environment['SE_OPTS'] = "--enable-managed-downloads true" + environment['SE_NODE_ENABLE_MANAGED_DOWNLOADS'] = "true" container_id = client.containers.run("%s/%s:%s" % (NAMESPACE, IMAGE_NAME_MAP[container], VERSION), detach=True, environment=environment,