Skip to content
Snippets Groups Projects
Commit cb0a40c0 authored by Jörn Künsemöller's avatar Jörn Künsemöller
Browse files

TMSS-535: missing assertion in test

parent d51d646e
No related branches found
No related tags found
3 merge requests!634WIP: COBALT commissioning delta,!514Resolve TMSS-535: LBA,!481Draft: SW-971 SW-973 SW-975: Various fixes to build LOFAR correctly.
......@@ -494,35 +494,18 @@ class TestObservationStrategiesSpecificationAndScheduling(unittest.TestCase):
# "mimic" that the cal_obs_subtask finished (including qa subtasks)
for subtask in cal_obs_task['subtasks']:
set_subtask_state_following_allowed_transitions(subtask['id'], 'finished')
#self.check_statuses(cal_obs_subtask['id'], "finished", "finished", "observed")
# todo: check_statuses does not allow for different statuses of multiple related tasks
# Either fix that, or fix the inconsistent statuses for target and calibrator tasks here.
# 99: ======================================================================
# 99: FAIL: test_lba_survey (__main__.TestObservationStrategiesSpecificationAndScheduling)
# 99: ----------------------------------------------------------------------
# 99: Traceback (most recent call last):
# 99: File "t_observation_strategies_specification_and_scheduling_test.py", line 493, in test_lba_survey
# 99: self.check_statuses(cal_obs_subtask['id'], "finished", "finished", "observed") # todo: verify
# 99: File "t_observation_strategies_specification_and_scheduling_test.py", line 77, in check_statuses
# 99: self.assertEqual(expected_task_status, task['status'])
# 99: AssertionError: 'finished' != 'observed'
# 99: - finished
# 99: + observed
# 99:
#
#
# 99: ======================================================================
# 99: FAIL: test_lba_survey (__main__.TestObservationStrategiesSpecificationAndScheduling)
# 99: ----------------------------------------------------------------------
# 99: Traceback (most recent call last):
# 99: File "t_observation_strategies_specification_and_scheduling_test.py", line 493, in test_lba_survey
# 99: self.check_statuses(cal_obs_subtask['id'], "finished", "observed", "observed") # todo: verify
# 99: File "t_observation_strategies_specification_and_scheduling_test.py", line 77, in check_statuses
# 99: self.assertEqual(expected_task_status, task['status'])
# 99: AssertionError: 'observed' != 'finished'
# 99: - observed
# 99: + finished
# 99:
# todo: check_statuses does not allow for different statuses of multiple related tasks, so we cannot do
# self.check_statuses(cal_obs_subtask['id'], "finished", "finished", "observed")
# but have to assert here directly. (Why are the statuses for target and calibrator tasks inconsistent here?)
cal_obs_subtask = self.tmss_client.get_subtask(cal_obs_subtask['id'])
self.assertEqual("finished", cal_obs_subtask['state_value'])
cal_obs_task = self.tmss_client.get_url_as_json_object(cal_obs_task['url'])
self.assertEqual("finished", cal_obs_task['status'])
target_obs_task = self.tmss_client.get_url_as_json_object(target_obs_task['url'])
self.assertEqual("observed", target_obs_task['status'])
schedunit = self.tmss_client.get_url_as_json_object(scheduling_unit_blueprint['url'])
self.assertEqual("observed", schedunit['status'])
# -------------------
# check pipelines
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment