From dcd356f8a6d41b3c9a83e947e3fde2bf8d42b3ac Mon Sep 17 00:00:00 2001 From: moe-ad Date: Wed, 5 Feb 2025 16:15:57 +0100 Subject: [PATCH] ci: implemented changes --- .github/workflows/tests.yml | 9 +++++++++ tests/entry/test_entry.py | 1 - tests/test_data_tree.py | 2 -- tests/test_server.py | 2 -- tox.ini | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9907d0ca2d..f838c45f5f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -247,6 +247,15 @@ jobs: command: | tox run-parallel -m ciparalleltests ${{ steps.tox-cli-arguments.outputs.TOX_EXTRA_ARG }} + - name: "Test API test_server" + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 2 + shell: bash + command: | + tox -e test-server,kill-servers ${{ steps.tox-cli-arguments.outputs.TOX_EXTRA_ARG }} + - name: "Test API test_remote_workflow" uses: nick-fields/retry@v3 with: diff --git a/tests/entry/test_entry.py b/tests/entry/test_entry.py index 38c3d34548..7ab00f28ff 100644 --- a/tests/entry/test_entry.py +++ b/tests/entry/test_entry.py @@ -139,7 +139,6 @@ def test_apply_context_remote(remote_config_server_type): @pytest.mark.order(5) @conftest.raises_for_servers_version_under("4.0") -@pytest.mark.skip(reason="affecting parallel runs in CI") def test_runtime_client_no_server(remote_config_server_type): dpf.server.shutdown_all_session_servers() dpf.SERVER_CONFIGURATION = remote_config_server_type diff --git a/tests/test_data_tree.py b/tests/test_data_tree.py index f3ca685d80..15215cd482 100644 --- a/tests/test_data_tree.py +++ b/tests/test_data_tree.py @@ -168,7 +168,6 @@ def test_write_data_tree(): @conftest.raises_for_servers_version_under("4.0") -@pytest.mark.skip(reason="affecting parallel runs in CI") def test_write_to_file_data_tree(tmpdir, server_type): data_tree = dpf.DataTree(server=server_type) with data_tree.to_fill() as to_fill: @@ -232,7 +231,6 @@ def test_write_to_file_remote_data_tree(tmpdir, server_clayer_remote_process): @conftest.raises_for_servers_version_under("4.0") -@pytest.mark.skip(reason="affecting parallel runs in CI") def test_read_from_txt_data_tree(server_type): data_tree = dpf.DataTree(server=server_type) with data_tree.to_fill() as to_fill: diff --git a/tests/test_server.py b/tests/test_server.py index 15140ae68b..b58b90f2c3 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -139,7 +139,6 @@ def test_shutdown_all_session_servers(self, server_config): shutdown_all_session_servers() assert not has_local_server() - @pytest.mark.skip(reason="affecting parallel runs in CI") def test_start_shutdown_start(self, server_config): set_server_configuration(server_config) # print(dpf.core.SERVER_CONFIGURATION) @@ -321,7 +320,6 @@ def test_go_away_server(): reason="Not existing in version lower than 4.0", ) @pytest.mark.skipif(running_docker, reason="Unstable on Docker") -@pytest.mark.skip(reason="affecting parallel runs in CI") def test_start_after_shutting_down_server(): remote_server = start_local_server( config=dpf.core.AvailableServerConfigs.GrpcServer, as_global=False diff --git a/tox.ini b/tox.ini index af1a130f57..c1b36ef38e 100644 --- a/tox.ini +++ b/tox.ini @@ -33,7 +33,7 @@ envlist = pretest,test-{api,launcher,server,local_server,multi_server,api_entry, labels = othertests = pretest,test-{workflow,remote_workflow,remote_operator,service},posttest,kill-servers - ciparalleltests = test-{api,launcher,server,local_server,multi_server,api_entry,custom_type_field,operators},kill-servers + ciparalleltests = test-{api,launcher,local_server,multi_server,api_entry,custom_type_field,operators},kill-servers isolated_build_env = build