From b53f88d8282c9d660dda9ca1bd670a1d7c7613ad Mon Sep 17 00:00:00 2001 From: Aziz Berkay Yesilyurt Date: Tue, 21 May 2024 13:11:19 +0200 Subject: [PATCH] Revert "enable job tests in integration tests" --- tests/integration/local/job_test.py | 8 +------- tox.ini | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/integration/local/job_test.py b/tests/integration/local/job_test.py index bf63f45b85f..e713da731df 100644 --- a/tests/integration/local/job_test.py +++ b/tests/integration/local/job_test.py @@ -2,6 +2,7 @@ # stdlib from secrets import token_hex +import time # third party import pytest @@ -23,7 +24,6 @@ def test_job_restart(job) -> None: assert wait_until( lambda: job.fetched_status == JobStatus.PROCESSING ), "Job not started" - assert wait_until(lambda: len(job.subjobs) == 2), "Subjobs not started" assert wait_until( lambda: all( subjob.fetched_status == JobStatus.PROCESSING for subjob in job.subjobs @@ -59,10 +59,6 @@ def test_job_restart(job) -> None: == 2 ), "Subjobs not restarted" - result = job.kill() - assert isinstance(result, SyftSuccess), "Should kill job" - assert job.fetched_status == JobStatus.INTERRUPTED - @pytest.fixture def node(): @@ -91,7 +87,6 @@ def job(node): @syft_function() def process_batch(): # stdlib - import time # noqa: F811 while time.sleep(1) is None: ... @@ -101,7 +96,6 @@ def process_batch(): @syft_function_single_use() def process_all(domain): # stdlib - import time # noqa: F811 _ = domain.launch_job(process_batch) _ = domain.launch_job(process_batch) diff --git a/tox.ini b/tox.ini index 69f98046aef..c79fa513cb1 100644 --- a/tox.ini +++ b/tox.ini @@ -477,7 +477,7 @@ allowlist_externals = setenv = PYTEST_MODULES = {env:PYTEST_MODULES:local_node} ASSOCIATION_REQUEST_AUTO_APPROVAL = {env:ASSOCIATION_REQUEST_AUTO_APPROVAL:true} - PYTEST_FLAGS = {env:PYTEST_FLAGS:--ignore=tests/integration/local/gateway_local_test.py} + PYTEST_FLAGS = {env:PYTEST_FLAGS:--ignore=tests/integration/local/gateway_local_test.py --ignore=tests/integration/local/job_test.py} commands = python -c 'import syft as sy; sy.stage_protocol_changes()' @@ -486,7 +486,7 @@ commands = PYTEST_MODULES=($PYTEST_MODULES); \ for i in "${PYTEST_MODULES[@]}"; do \ echo "Starting test for $i"; date; \ - pytest tests/integration -n auto -m $i -vvvv -p no:randomly -p no:benchmark -o log_cli=True --capture=no $PYTEST_FLAGS; \ + pytest tests/integration -m $i -vvvv -p no:randomly -p no:benchmark -o log_cli=True --capture=no $PYTEST_FLAGS; \ return=$?; \ echo "Finished $i"; \ date; \