Skip to content

Add unit test for partitions with TRES=(null) (#864) - #950

Merged
johrstrom merged 2 commits into
masterfrom
add-tres-null-test-864
Jul 31, 2026
Merged

Add unit test for partitions with TRES=(null) (#864)#950
johrstrom merged 2 commits into
masterfrom
add-tres-null-test-864

Conversation

@adhati09

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds a unit test and fixture to verify that the Slurm adapter correctly parses partitions when TRES=(null). This ensures adapter.queues handles unconfigured or null TRES values gracefully without throwing exceptions.

Related issue

Fixes #864

Testing

  • Tests included
  • No tests needed — reason: ___

Checklist

  • Follows project code style and conventions
  • Documentation provided (if new feature, adapter or behavior change)
  • This is a large feature and was discussed in an issue first (if applicable)

Anything else?

 Added:

spec/fixtures/output/slurm/scontrol_show_part_tres_null.txt fixture containing output with TRES=(null).

test_queues_with_tres_null test method in test/job/adapters/slurm_test.rb.

@adhati09
adhati09 requested review from johrstrom and osc-bot July 29, 2026 16:50
@adhati09 adhati09 added the slurm label Jul 29, 2026
@adhati09 adhati09 self-assigned this Jul 29, 2026
@adhati09
adhati09 requested a review from Bubballoo3 July 29, 2026 16:57

@Bubballoo3 Bubballoo3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the test content looks good, just a few minor points on fixture placement and style

Comment thread spec/fixtures/output/slurm/scontrol_show_part_tres_null.txt Outdated
Comment thread test/job/adapters/slurm_test.rb Outdated

@johrstrom johrstrom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks to fixing this and thanks @Bubballoo3 for the review.

@johrstrom
johrstrom requested a review from Bubballoo3 July 31, 2026 12:57
@johrstrom
johrstrom dismissed Bubballoo3’s stale review July 31, 2026 12:57

Changes requested have been made.

@johrstrom
johrstrom merged commit 5dde7df into master Jul 31, 2026
4 checks passed
@johrstrom
johrstrom deleted the add-tres-null-test-864 branch July 31, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

auto_queues failed if TRES=(null) for partition

3 participants