Repository navigation
Test: Shared integration tests for the backends - #38
Draft
Alexander-Auer wants to merge 117 commits into
Draft
Alexander-Auer wants to merge 117 commits into
Alexander-Auer wants to merge 117 commits into
Conversation
… have them link to each other
…ede into feat/core-contract
…a consumer should choose to use it or not
* feat: Models the core contract needs * Feat: Protocols and Exceptions added for the core contract * Feat: Private protocols for the BatchBackend * feat: a fake backend to run unit tests against * fix: some code cleanup in the helper functions * feat: setup for the unit test suite * chore: style fix * chore: styling, unit test fixture * chore: single letter var `h` refering to hanlde changed to `handle` * fix: unused parameter in `test_injected_failure_is_reported_per_job()` removed * feat: Models the core contract needs * Feat: Protocols and Exceptions added for the core contract * Feat: Private protocols for the BatchBackend * feat: a fake backend to run unit tests against * fix: some code cleanup in the helper functions * feat: setup for the unit test suite * chore: style fix * chore: styling, unit test fixture * chore: single letter var `h` refering to hanlde changed to `handle` * fix: unused parameter in `test_injected_failure_is_reported_per_job()` removed * fix: made the OutputSpec optional as it is not suppoerted by all and a consumer should choose to use it or not --------- Co-authored-by: alexander <alexander.auer@cern.ch>
Alexander-Auer
force-pushed
the
stack/htcondor-6-contract-suite
branch
from
November 6, 2026 13:11
0405f83 to
07dfe7e
Compare
Alexander-Auer
force-pushed
the
stack/htcondor-6-contract-suite
branch
from
November 16, 2026 08:24
07dfe7e to
e827eb9
Compare
…e any job is submitted A line break in an argument or variable raised a raw ValueError, after the clusters before it were already submitted: those jobs stayed queued without a handle. Every description is now written first, and such a value is a SpecificationRejectedError.
The core is tested through the HTCondor-CE backend that uses it, and on the htcondor stack by the shared suite.
…show Normal submit and status are the shared suite's, on the htcondor stack. One file stays, through the backend's public operations: the states a stack never reaches, refusals, partial submissions, secrets and the token, resources, and the answers of a CE that refuses or cannot be read.
…ill-purge # Conflicts: # tests/unit/backends/htcondorce/test_process.py # tests/unit/backends/htcondorce/test_status.py
Killing and purging are the shared suite's, on the htcondor stack.
# Conflicts: # tests/unit/backends/htcondorce/test_cleanup.py # tests/unit/backends/htcondorce/test_working_area.py
…cannot show Collecting output is the shared suite's, on the htcondor stack. What stays: a CE that points outside the working area or sends links, the limits, transfers that fail or bring nothing, and one job collected twice at once.
Arguments and variables arrive as written, or are refused at submit when the way a backend starts a job would change them; a copy's variable wins over the shared one and stays out of the other copies. The job checks this itself, so a backend that cannot collect output runs these tests too. A backend's unit tests now cover only what a healthy stack does not show.
… into stack/htcondor-6-contract-suite
…into stack/htcondor-3-submit-status
…o stack/htcondor-4-kill-purge
…ack/htcondor-5-output
Both were only checked against the fake backend: a backend reads local files before submit returns, and a closed backend can be closed again but does no more work.
The shared suite has landed and every stack runs it, so pytest's exit 5 (no test selected) no longer passes as green. The step's matrix values reach the shell through its environment, as elsewhere in the workflow.
backend.py only builds the parts and checks that the backend is open. Submitting is in submit.py; what every operation shares (which handles are ours, the CE's job ads, the sessions, status) is in jobs.py.
backend.py only builds the parts and checks that the backend is open. Submitting is in submit.py, kill and purge in cancel.py; what every operation shares (which handles are ours, the CE's job ads, the sessions, status) is in jobs.py.
…ill-purge # Conflicts: # src/intercede/_backends/monolith/htcondorce/__init__.py # src/intercede/_backends/monolith/htcondorce/backend.py # src/intercede/_backends/monolith/htcondorce/jobs.py
backend.py only builds the parts and checks that the backend is open. Submitting is in submit.py, output in output.py, kill and purge in cancel.py; what every operation shares (which handles are ours, the CE's job ads, the sessions, status) is in jobs.py.
# Conflicts: # src/intercede/_backends/monolith/htcondorce/__init__.py # src/intercede/_backends/monolith/htcondorce/backend.py
…-suite # Conflicts: # .github/workflows/integration.yml
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test: the shared contract suite, on the htcondor stack
Last PR for #23 (PR 6 of 6).
Important
Depends on #34 (
stack/htcondor-2-integration-stack) and PR 5 (stack/htcondor-5-output). Merge after both.Until then, this diff also shows the earlier PRs. This PR's own change: 799 lines
One set of tests, written against the interCEde protocols, runs on every stack, so a new backend writes no integration tests of its own.
What's added
tests/integration/test_*.py: 22 tests covering submit, status, output, kill, purge and what a consumer sees when things go wrong.contractmarker, which selects these tests whatever a stack'smarkerssay.output_retriever,killable,purgeable), which skip a test on a backend without that capability.[refusals]in a stack's client config, which says what its backend cannot honour. The suite checks each is refused at submit.htcondor-utilsin the pixi testing environment, plus the docs and the stack template.Result
The same content passed on
ltsandlateston my fork (eb0fec6). Three tests skip on this stack, and the log names them: the refusal checks forurl_inputsandurl_outputs(HTCondor supports both), and the test for a backend that cannot collect output.