Skip to content

Commit

Permalink
wip: non-working test
Browse files Browse the repository at this point in the history
  • Loading branch information
berland committed Jan 9, 2025
1 parent 93c4e13 commit c930d3d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ert/scheduler/lsf_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ async def poll(self) -> None:
current_jobids = list(self._jobs.keys())

try:
print("POLLLING BJOBS")
process = await asyncio.create_subprocess_exec(
str(self._bjobs_cmd),
"-noheader",
Expand Down
14 changes: 14 additions & 0 deletions tests/ert/unit_tests/scheduler/test_lsf_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -1269,6 +1269,20 @@ def mock_poll_once_by_bhist(*args, **kwargs):
assert job_id in driver._bhist_cache


@pytest.mark.integration_test
async def test_no_exception_when_bjobs_does_not_exist(caplog, job_name):
caplog.set_level(logging.DEBUG)
driver = LsfDriver(
bjobs_cmd="/bin_foo/not_existing", bhist_cmd="/bin_bar/not_existing"
)
driver._poll_period = 0.01
await driver.submit(0, "sh", "-c", "sleep 1", name=job_name)
await poll(driver, {0})
print("waiting..")
await asyncio.sleep(1)
print(caplog.text)


@pytest.mark.integration_test
async def test_that_kill_before_submit_is_finished_works(tmp_path, monkeypatch, caplog):
"""This test asserts that it is possible to issue a kill command
Expand Down

0 comments on commit c930d3d

Please sign in to comment.