Skip to content

Commit

Permalink
Fix integration test lsf driver invalid resource requirement
Browse files Browse the repository at this point in the history
This commit fixes the invald resource requirement in /tests/integration_tests/scheduler/test_lsf_driver.py::test_submit_with_resource_requirement
  • Loading branch information
jonathan-eq committed Apr 4, 2024
1 parent 66e7fe5 commit cdc90ba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/integration_tests/scheduler/test_lsf_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ async def finished(iens, returncode):


async def test_submit_with_resource_requirement(tmp_path):
resource_requirement = "rusage=[mem=20MB]"
resource_requirement = "select[cs && x86_64Linux]"
driver = LsfDriver(resource_requirement=resource_requirement)
await driver.submit(0, "sh", "-c", f"echo test>{tmp_path}/test")
await poll(driver, {0})
Expand Down
4 changes: 2 additions & 2 deletions tests/unit_tests/scheduler/test_lsf_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ async def test_submit_with_default_queue():

@pytest.mark.usefixtures("capturing_bsub")
async def test_submit_with_resource_requirement():
driver = LsfDriver(resource_requirement="rusage[mem=512MB:swp=1GB]")
driver = LsfDriver(resource_requirement="select[cs && x86_64Linux]")
await driver.submit(0, "sleep")
assert "-R rusage[mem=512MB:swp=1GB]" in Path("captured_bsub_args").read_text(
assert "-R select[cs && x86_64Linux]" in Path("captured_bsub_args").read_text(
encoding="utf-8"
)

Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/scheduler/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ def test_scheduler_create_lsf_driver():
bkill_cmd = "foo_bkill_cmd"
bjobs_cmd = "bar_bjobs_cmd"
bhist_cmd = "com_bjobs_cmd"
lsf_resource = "rusage[mem=512MB:swp=1GB]"
lsf_resource = "select[cs && x86_64Linux]"
queue_config_dict = {
"QUEUE_SYSTEM": "LSF",
"QUEUE_OPTION": [
Expand Down

0 comments on commit cdc90ba

Please sign in to comment.