TestSoftWalltime.test_restart_server failing with race conditions

Description

Test is restarting server and looking for the estimated.soft_walltime match

self.server.restart()

self.server.expect(JOB, {'Resource_List.soft_walltime': 8,
'estimated.soft_walltime':
(MATCH_RE, '00:00:16|16')},
attrop=PTL_AND, id=jid)

  1. Delete the job and verify that estimated.soft_walltime is set

  2. for job history
    self.server.deljob(jid, wait=True)
    self.server.expect(JOB,
    {'job_state': 'F',
    'estimated.soft_walltime':
    (MATCH_RE, '00:00:16|16|00:00:24|24')},
    extend='x', attrop=PTL_AND, id=jid)

sometime test is failing at first expect just after restart where restart took 10s

2017-12-04 05:10:46,261 INFOCLI x77-r6-altix: /opt/pbs/bin/qstat -f 7.x77-r6-altix
2017-12-04 05:10:46,298 INFO expect on server x77-r6-altix: Resource_List.soft_walltime = 8 && estimated.soft_walltime ~ 00:00:16|16 job 7.x77-r6-altix got: estimated.soft_walltime = 24

other times test is failing when job is finished. overall time in this case including server restart and job deletion is 17s.

Looks like test needs some restructuring

Acceptance Criteria

None

Status

Assignee

Unassigned

Reporter

anamika upadhyay

Severity

3-High

OS

None

Start Date

None

Pull Request URL

None

Story Points

1

Components

Priority

High
Configure