Skip to content

Commit

Permalink
tests were failing as -h was passed with an option
Browse files Browse the repository at this point in the history
  • Loading branch information
anamikau committed Jan 4, 2019
1 parent 8080052 commit 2950f33
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion test/tests/functional/pbs_hook_unset_res.py
Expand Up @@ -62,7 +62,7 @@ def test_modifyjob_hook(self):
self.server.manager(MGR_CMD_SET, SERVER, {
'log_events': 2047}, expect=True)
j = Job(TEST_USER, attrs={
'Resource_List.select': '1:ncpus=1', 'Hold_Types': 'u'})
'Resource_List.select': '1:ncpus=1', ATTR_h: None})
jid = self.server.submit(j)
self.server.expect(JOB, {'job_state': 'H'}, id=jid)
self.server.alterjob(jid, {'Resource_List.ncpus': '2'})
2 changes: 1 addition & 1 deletion test/tests/functional/pbs_job_routing.py
Expand Up @@ -80,7 +80,7 @@ def test_t1(self):

job_attrib = Job(TEST_USER, attrs={ATTR_queue: 'routeq',
ATTR_l + '.ncpus': 1,
ATTR_h: 'u',
ATTR_h: None,
ATTR_J: '1-2',
ATTR_r: 'y'})

Expand Down
2 changes: 1 addition & 1 deletion test/tests/functional/pbs_node_rampdown.py
Expand Up @@ -1612,7 +1612,7 @@ def test_release_nodes_error(self):

# Test pbs_release_nodes on a non-running job
a = {'Resource_List.select': '3:ncpus=1',
'Hold_Types': 'u',
ATTR_h: None,
'Resource_List.place': 'scatter'}
jid = self.create_and_submit_job('job', a)

Expand Down
16 changes: 8 additions & 8 deletions test/tests/functional/pbs_soft_walltime.py
Expand Up @@ -188,7 +188,7 @@ def test_soft_walltime_STF(self):
Test that STF jobs can't have soft_walltime
"""
msg = 'soft_walltime is not supported with Shrink to Fit jobs'
J = Job(attrs={'Resource_List.min_walltime': 120, ATTR_h: 'u'})
J = Job(attrs={'Resource_List.min_walltime': 120, ATTR_h: None})
jid = self.server.submit(J)
try:
self.server.alterjob(jid, {'Resource_List.soft_walltime': 10})
Expand All @@ -198,7 +198,7 @@ def test_soft_walltime_STF(self):
self.server.expect(JOB, 'Resource_List.soft_walltime',
op=UNSET, id=jid)

J = Job(TEST_USER, attrs={ATTR_h: 'u'})
J = Job(TEST_USER, attrs={ATTR_h: None})
jid = self.server.submit(J)
self.server.alterjob(jid, {'Resource_List.soft_walltime': 10})
try:
Expand All @@ -209,7 +209,7 @@ def test_soft_walltime_STF(self):
self.server.expect(JOB, 'Resource_List.min_walltime',
op=UNSET, id=jid)

J = Job(TEST_USER, attrs={ATTR_h: 'u'})
J = Job(TEST_USER, attrs={ATTR_h: None})
jid = self.server.submit(J)
a = {'Resource_List.soft_walltime': 10,
'Resource_List.min_walltime': 120}
Expand All @@ -226,7 +226,7 @@ def test_soft_greater_hard(self):
Test that a job's soft_walltime can't be greater than its hard walltime
"""
msg = 'Illegal attribute or resource value'
J = Job(TEST_USER, attrs={'Resource_List.walltime': 120, ATTR_h: 'u'})
J = Job(TEST_USER, attrs={'Resource_List.walltime': 120, ATTR_h: None})
jid = self.server.submit(J)

try:
Expand All @@ -237,7 +237,7 @@ def test_soft_greater_hard(self):
self.server.expect(JOB, 'Resource_List.soft_walltime',
op=UNSET, id=jid)

J = Job(TEST_USER, {ATTR_h: 'u'})
J = Job(TEST_USER, {ATTR_h: None})
jid = self.server.submit(J)
self.server.alterjob(jid, {'Resource_List.soft_walltime': 240})
try:
Expand All @@ -247,7 +247,7 @@ def test_soft_greater_hard(self):

self.server.expect(JOB, 'Resource_List.walltime', op=UNSET, id=jid)

J = Job(TEST_USER, {ATTR_h: 'u'})
J = Job(TEST_USER, {ATTR_h: None})
jid = self.server.submit(J)
try:
self.server.alterjob(jid, {'Resource_List.walltime': 120,
Expand Down Expand Up @@ -517,7 +517,7 @@ def test_resv_job_soft(self):
{'reserve_state': (MATCH_RE, 'RESV_CONFIRMED|2')},
id=rid)

a = {'Resource_List.ncpus': 4, ATTR_h: 'u'}
a = {'Resource_List.ncpus': 4, ATTR_h: None}
J = Job(TEST_USER, attrs=a)
jid = self.server.submit(J)
self.server.alterjob(jid, {'Resource_List.soft_walltime': 60})
Expand Down Expand Up @@ -547,7 +547,7 @@ def test_resv_job_soft_hard(self):
id=rid)

a = {'Resource_List.ncpus': 4,
'Resource_List.walltime': 150, ATTR_h: 'u'}
'Resource_List.walltime': 150, ATTR_h: None}
J = Job(TEST_USER, attrs=a)
jid = self.server.submit(J)
self.server.alterjob(jid, {'Resource_List.soft_walltime': 60})
Expand Down

0 comments on commit 2950f33

Please sign in to comment.