Skip to content

Commit

Permalink
chore: restore parallelism
Browse files Browse the repository at this point in the history
Signed-off-by: SdgJlbl <[email protected]>
  • Loading branch information
SdgJlbl committed Feb 14, 2024
1 parent 6719b42 commit db9eac3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Nightly is now done on `owkin/substra-ci` repository ([#304](https://github.com/Substra/substra-tests/pull/304))
- Parallelism in SDK tests in deactivated until we fix the parallel compute plans issues ([#306](https://github.com/Substra/substra-tests/pull/306))
- A bunch of SDK tests are skipped due to regressions following the decoupled builder merge ([#306](https://github.com/Substra/substra-tests/pull/306))
- Reactivated tests and parallelism in SDK tests ([#315](https://github.com/Substra/substra-tests/pull/315), [#317](https://github.com/Substra/substra-tests/pull/317))

## [0.47.0] - 2023-10-18

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ test: test-remote test-local
test-remote: test-remote-sdk test-remote-workflows

test-remote-sdk: pyclean
pytest tests -rs -v --durations=0 -m "not workflows" --log-level=INFO
pytest tests -rs -v --durations=0 -m "not workflows" -n $(PARALLELISM) --log-level=INFO

test-remote-workflows: pyclean
pytest tests -v --durations=0 -m "workflows" --log-level=INFO

test-minimal: pyclean
pytest tests -rs -v --durations=0 -m "not slow and not workflows" --log-level=INFO
pytest tests -rs -v --durations=0 -m "not slow and not workflows" -n $(PARALLELISM) --log-level=INFO

test-local: test-subprocess test-docker test-subprocess-workflows

Expand Down
19 changes: 16 additions & 3 deletions tests/test_docker_image_build.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import functools
import time

import pytest
Expand Down Expand Up @@ -44,10 +45,22 @@ def test_function_build_when_submitted(factory, cfg, client, worker):
spec = factory.create_function(function_category, dockerfile=dockerfile)
function = client.add_function(spec)

# Cannot use `get_function` as status is not yet exposed through substra SDK
function = client._backend._client.get("function", function.key)
timeout = 300
# TODO refactor: Cannot use `get_function` as status is not yet exposed through substra SDK

client._wait(
key=function.key,
asset_getter=functools.partial(client._backend._client.get, "function"),
polling_period=1,
status_canceled="FUNCTION_STATUS_CANCELED",
status_failed="FUNCTION_STATUS_FAILED",
statuses_stopped=["FUNCTION_STATUS_READY"],
timeout=timeout,
raise_on_failure=True,
)

assert function["status"] == "FUNCTION_STATUS_BUILDING"
function = client._backend._client.get("function", function.key)
assert function["status"] == "FUNCTION_STATUS_READY"


@pytest.mark.remote_only
Expand Down
1 change: 0 additions & 1 deletion tests/test_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,6 @@ def test_composite_traintasks_execution(factory, client, default_dataset, defaul
assert set([composite_traintask_1.key, composite_traintask_2.key]).issubset(composite_traintask_keys)


@pytest.mark.skip(reason="Linked to decoupled builder merge")
@pytest.mark.slow
def test_aggregatetask(factory, client, default_metric, default_dataset, worker):
"""Execution of aggregatetask aggregating traintasks. (traintasks -> aggregatetask)"""
Expand Down

0 comments on commit db9eac3

Please sign in to comment.