From 867e161f32ed2c3571b77f2c54556b89f4bc62ed Mon Sep 17 00:00:00 2001 From: Jens L Date: Sun, 6 Dec 2020 16:17:51 +0100 Subject: [PATCH] tests: fix proxy pipeline (#367) * tests: retry on WebDriverException * tests: remove debug statements --- tests/e2e/utils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/e2e/utils.py b/tests/e2e/utils.py index 619ea159f..6ab15fe93 100644 --- a/tests/e2e/utils.py +++ b/tests/e2e/utils.py @@ -17,7 +17,11 @@ from django.test.testcases import TransactionTestCase from docker import DockerClient, from_env from docker.models.containers import Container from selenium import webdriver -from selenium.common.exceptions import NoSuchElementException, TimeoutException +from selenium.common.exceptions import ( + NoSuchElementException, + TimeoutException, + WebDriverException, +) from selenium.webdriver.common.by import By from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.webdriver.remote.webdriver import WebDriver @@ -149,7 +153,7 @@ def retry(max_retires=3, exceptions=None): """Retry test multiple times. Default to catching Selenium Timeout Exception""" if not exceptions: - exceptions = [TimeoutException, NoSuchElementException] + exceptions = [WebDriverException, TimeoutException, NoSuchElementException] logger = get_logger()