From ecc3ad26d4406061f85aaa67f3e46f63917f962c Mon Sep 17 00:00:00 2001 From: Matt Hall Date: Tue, 28 Feb 2023 15:04:49 +0100 Subject: [PATCH 1/3] Fix flaky test on self-hosted runner One of the Selenium tests on a plot axis title was sometimes timing out. This change doubles the timeout to 20s. For sure, 10s already seems long; if there's still an issue it may be another problem. --- tests/views/test_response_correlation.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/views/test_response_correlation.py b/tests/views/test_response_correlation.py index 4253c7c2..31d9a0b6 100644 --- a/tests/views/test_response_correlation.py +++ b/tests/views/test_response_correlation.py @@ -30,8 +30,9 @@ def test_axes_labels(mock_data, dash_duo): plot_id = plugin.uuid("response-overview") - # check that y axis label spells out "Value" - dash_duo.wait_for_text_to_equal(f"#{plot_id} text.ytitle", "Value") + # check that y axis label spells out "Value"; test is flaky so longer + # timeout. + dash_duo.wait_for_text_to_equal(f"#{plot_id} text.ytitle", "Value", timeout=20) # check that one has date, the other has index as x axis label if wanted_response == "FOPR": From 01462662dfa5729198939e92af28d35d8deaeab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Eide?= Date: Mon, 13 Mar 2023 13:16:51 +0100 Subject: [PATCH 2/3] Update to new ert api for StorageService --- tests/data/spe1_st/tests/conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/data/spe1_st/tests/conftest.py b/tests/data/spe1_st/tests/conftest.py index 077ec487..cb6b8e4e 100644 --- a/tests/data/spe1_st/tests/conftest.py +++ b/tests/data/spe1_st/tests/conftest.py @@ -3,8 +3,8 @@ @pytest.fixture(scope="session", autouse=True) def start_storage_server(): - from ert.services import Storage + from ert.services import StorageService - with Storage.start_server() as service: + with StorageService.start_server() as service: service.wait_until_ready(timeout=30) yield service From d66eae683861cbe16fd7d19852d836b013ac6478 Mon Sep 17 00:00:00 2001 From: Frode Aarstad Date: Thu, 16 Mar 2023 13:07:39 +0100 Subject: [PATCH 3/3] Add xfail to spe1 tests --- tests/data/spe1_st/tests/test_webviz_ert.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/data/spe1_st/tests/test_webviz_ert.py b/tests/data/spe1_st/tests/test_webviz_ert.py index f8728d63..07a8cdd9 100644 --- a/tests/data/spe1_st/tests/test_webviz_ert.py +++ b/tests/data/spe1_st/tests/test_webviz_ert.py @@ -29,6 +29,7 @@ def _verify_keys_in_menu(dash_duo_handle, plugin, keys, selector): @pytest.mark.spe1 +@pytest.mark.xfail(reason="Fails because ert>5 no longer supports ert-storage") def test_webviz_parameter_comparison(dash_duo): plugin = setup_plugin(dash_duo, __name__, ParameterComparison) @@ -45,6 +46,7 @@ def test_webviz_parameter_comparison(dash_duo): @pytest.mark.spe1 +@pytest.mark.xfail(reason="Fails because ert>5 no longer supports ert-storage") def test_webviz_response_correlation(dash_duo): plugin = setup_plugin(dash_duo, __name__, ResponseCorrelation) @@ -84,6 +86,7 @@ def test_webviz_response_correlation(dash_duo): @pytest.mark.spe1 +@pytest.mark.xfail(reason="Fails because ert>5 no longer supports ert-storage") def test_webviz_response_comparison(dash_duo): plugin = setup_plugin(dash_duo, __name__, ResponseComparison) @@ -119,6 +122,7 @@ def test_webviz_response_comparison(dash_duo): @pytest.mark.spe1 +@pytest.mark.xfail(reason="Fails because ert>5 no longer supports ert-storage") def test_webviz_observation_analyzer(dash_duo): plugin = setup_plugin(dash_duo, __name__, ObservationAnalyzer)