Skip to content

Add fast integration tests for cluv submit that can run in CI - #224

Open
lebrice wants to merge 1 commit into
masterfrom
add-fast-submit-integration-tests
Open

lebrice wants to merge 1 commit into
masterfrom
add-fast-submit-integration-tests

Conversation

@lebrice

@lebrice lebrice commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

The existing real-cluster test_submit is skipped in CI (it waits for the job to actually run), so the real sync → sbatch path of cluv submit has no coverage on Codecov.

This adds two integration tests that exercise that path in seconds:

  • test_submit_held_job: submits scripts/job.sh with --hold. A held job stays PENDING, so submit returns as soon as it sees it's the only pending job (no waiting for resources). Checks that a Job is returned and sacct reports PENDING, then scancels it.
  • test_submit_rejected_by_sbatch: submits with --partition=cluv-does-not-exist and checks that submit returns None when sbatch rejects the job.

Both follow test_submit's conventions (slow marker, xfail on clusters outside SUBMIT_SUPPORTED_CLUSTERS). In the self-hosted CI they'll run on mila; tamia xfails.

Tested locally: 4 passed (mila + rorqual) in ~2 min, no held jobs left in the queue.

🤖 Generated with Claude Code

…ion)

A held job stays PENDING, so `submit` returns as soon as it's the only
pending job: this exercises the real sync + sbatch path without waiting
for resources, so it can run in the self-hosted CI unlike `test_submit`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.42%. Comparing base (5c25d22) to head (9c9f8f0).

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #224       +/-   ##
===========================================
+ Coverage   72.10%   87.42%   +15.31%     
===========================================
  Files          22       22               
  Lines        2370     2370               
===========================================
+ Hits         1709     2072      +363     
+ Misses        661      298      -363     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lebrice
lebrice requested a review from hvdbm September 28, 2026 16:56

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants