Skip to content

Commit bb3a026

Browse files
author
Vasileios Karakasis
committed
Address PR comments
Also: - Enable max_pending_time unit test for the Torque backend.
1 parent e77a66a commit bb3a026

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

unittests/test_schedulers.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,10 @@ def test_submit_max_pending_time(self):
206206
self.parallel_cmd = 'sleep 30'
207207
self.prepare()
208208
self.testjob.scheduler._update_state = self._update_state
209-
self.testjob._max_pending_time = timedelta(seconds=5)
209+
self.testjob._max_pending_time = timedelta(milliseconds=50)
210210
self.testjob.submit()
211-
with pytest.raises(JobError):
211+
with pytest.raises(JobError,
212+
match='maximum pending time exceeded'):
212213
self.testjob.wait()
213214

214215

@@ -588,6 +589,9 @@ def test_submit_timelimit(self):
588589
def _update_state(self, job):
589590
job.state = 'QUEUED'
590591

592+
def test_submit_max_pending_time(self):
593+
_TestJob.test_submit_max_pending_time(self)
594+
591595

592596
class TestSlurmFlexibleNodeAllocation(unittest.TestCase):
593597
def create_dummy_nodes(obj):

0 commit comments

Comments
 (0)