From 6ca7400f3f277b34bb70786dffae01c5202e12b2 Mon Sep 17 00:00:00 2001 From: softir Date: Fri, 20 Mar 2020 00:24:39 +0100 Subject: [PATCH] AT5-382: EndSb typo in decorator function. Removed tests to switch-off the CSP. Updated release number. --- csp-lmc-common/csp_lmc_common/CspSubarray.py | 2 +- csp-lmc-common/csp_lmc_common/release.py | 2 +- .../csp_lmc_common/utils/decorators.py | 2 +- csp-lmc-common/docker/.release | 6 ++-- csp-lmc-common/tests/CspMaster_test.py | 30 ------------------- 5 files changed, 6 insertions(+), 36 deletions(-) diff --git a/csp-lmc-common/csp_lmc_common/CspSubarray.py b/csp-lmc-common/csp_lmc_common/CspSubarray.py index 3001318..f667c8e 100644 --- a/csp-lmc-common/csp_lmc_common/CspSubarray.py +++ b/csp-lmc-common/csp_lmc_common/CspSubarray.py @@ -2246,7 +2246,7 @@ class CspSubarray(SKASubarray): # read the timeout attribute configured for this command # if not implemented an AttributeError exception is thrown # and the default value is used - self._sc_subarray_cmd_duration_expected[device]['gotoidle'] = proxy.endSBCmdDurationExpected + self._sc_subarray_cmd_duration_expected[device]['gotoidle'] = proxy.gotoIdleCmdDurationExpected except KeyError as key_err: self.logger.warning("GoToIdle execution:no key {} found".format(str(key_err))) except tango.DevFailed as tango_err: diff --git a/csp-lmc-common/csp_lmc_common/release.py b/csp-lmc-common/csp_lmc_common/release.py index 399824d..bfd24f5 100755 --- a/csp-lmc-common/csp_lmc_common/release.py +++ b/csp-lmc-common/csp_lmc_common/release.py @@ -10,7 +10,7 @@ """Release information for Python Package""" name = """csp-lmc-common""" -version = "0.5.2" +version = "0.5.3" version_info = version.split(".") description = """SKA CSP.LMC Common Software""" author = "INAF-OAA" diff --git a/csp-lmc-common/csp_lmc_common/utils/decorators.py b/csp-lmc-common/csp_lmc_common/utils/decorators.py index cc42a09..f8f51d7 100644 --- a/csp-lmc-common/csp_lmc_common/utils/decorators.py +++ b/csp-lmc-common/csp_lmc_common/utils/decorators.py @@ -53,7 +53,7 @@ VALID_OBS_STATE = {'abort': [ObsState.CONFIGURING, ObsState.SCANNING], 'configscan': [ObsState.IDLE, ObsState.READY], 'scan': [ObsState.READY], 'endscan': [ObsState.SCANNING], - 'endsb': [ObsState.READY, ObsState.IDLE], + 'gotoidle': [ObsState.READY, ObsState.IDLE], 'addresources': [ObsState.IDLE], 'removeresources': [ObsState.IDLE] } diff --git a/csp-lmc-common/docker/.release b/csp-lmc-common/docker/.release index bbaed17..77bb209 100644 --- a/csp-lmc-common/docker/.release +++ b/csp-lmc-common/docker/.release @@ -9,7 +9,7 @@ """Release information for Python Package""" name = """csplmc-common""" -version = "0.5.2" +version = "0.5.3" version_info = version.split(".") description = """SKA CSP.LMC Common Classe""" author = "E.G" @@ -18,5 +18,5 @@ license = """BSD-3-Clause""" url = """www.tango-controls.org""" copyright = """""" -release=0.5.1 -tag=csp-lmc-common-0.5.2 +release=0.5.3 +tag=csp-lmc-common-0.5.3 diff --git a/csp-lmc-common/tests/CspMaster_test.py b/csp-lmc-common/tests/CspMaster_test.py index 4e5a0de..a9b73f9 100755 --- a/csp-lmc-common/tests/CspMaster_test.py +++ b/csp-lmc-common/tests/CspMaster_test.py @@ -194,33 +194,3 @@ class TestCspMaster(object): time.sleep(3) num_of_task = tango_context.device.numOfDevCompletedTask assert num_of_task == 1 - - def test_On_invalid_state(self, tango_context, cbf_master): - """ - Test for the execution of the On command when the CbfTestMaster - is in an invalid state - """ - #reinit CSP and CBFTest master devices - cbf_master.Init() - # sleep for a while to wait for state transitions - time.sleep(3) - #assert tango_context.device.cspCbfState == DevState.STANDBY - assert tango_context.device.cspCbfState == DevState.STANDBY - # issue the command to switch off the CbfMaster - argin = [tango_context.device.cbfMasterAddress,] - tango_context.device.Off(argin) - # wait for the state transition from STANDBY to OFF - time.sleep(3) - assert tango_context.device.cspCbfState == DevState.OFF - assert cbf_master.State() == DevState.OFF - # issue the command to switch on the CbfMaster device - with pytest.raises(tango.DevFailed) as df: - argin = ["mid_csp_cbf/sub_elt/master", ] - tango_context.device.On(argin) - assert "Command On not allowed when the device is in OFF state" in str(df.value.args[0].desc) - - def test_off_execution_timeout(self, tango_context): - off_timeout = tango_context.device.offCmdTimeoutExpired - assert not off_timeout - time_measured = tango_context.device.offCmdDurationMeasured - assert time_measured > 0 -- GitLab