PTL scheduler.cycles not returning expected outcome

Description

Getting following error for following piece of code (this is an existing test added last December)

cycle = self.scheduler.cycles(start=self.server.ctime, lastN=1)
cycle = cycle[0]
firstconsidered = cycle.political_order[0]

2017-08-01 23:21:53,215 INFO ERROR: test_qorder_job (tests.functional.pbs_test_qorder.Test_qorder)

2017-08-01 23:21:53,215 INFO __m_oo_m__
2017-08-01 23:21:53,216 INFO Traceback (most recent call last):
File "/r/shared/users/anamika/test_pbspro/tests/functional/pbs_test_qorder.py", line 77, in test_qorder_job
cycle = cycle[0]
IndexError: list index out of range

2017-08-01 23:21:53,216 INFO ======================================================================
2017-08-01 23:21:53,216 INFO ERROR: test_qorder_job_across_queues (tests.functional.pbs_test_qorder.Test_qorder)

2017-08-01 23:21:53,216 INFO __m_oo_m__
2017-08-01 23:21:53,216 INFO Traceback (most recent call last):
File "/r/shared/users/anamika/test_pbspro/tests/functional/pbs_test_qorder.py", line 117, in test_qorder_job_across_queues
cycle = cycle[0]
IndexError: list index out of range

I tried to print the output of cycle and it printed '[]'. Looks like something is broken.

Acceptance Criteria

None

Activity

Show:
Scott Campbell
August 2, 2017, 8:58 PM

From duplicate PP-888:

self.scheduler.cycles should return a list of cycles. It's only returning an empty list now.
This is breaking a couple of existing test cases. It is causing some of the smoke tests to not completely work. The smoke tests call self.scheduler.cycles() and then checks for the length of the list which is returned. This error check is causing the tests to pass even though they don't test the cycle information like they should.
The commit which introduced this was: 92bc657 PP-758: Add pbs_snapshot tool

Ravi Agrawal
August 3, 2017, 10:43 AM

A new PTL test for this is not necessary as the bugfix involves a change to PTL's framework itself, so running existing test cases which use the modified interfaces should be sufficient testing of the changes.

Assignee

Ravi Agrawal

Reporter

anamika upadhyay

Severity

None

OS

None

Start Date

None

Pull Request URL

None

Story Points

1

Components

Fix versions

Affects versions

Priority

Critical
Configure