Skip to content
Snippets Groups Projects

Resolve CT-215

Merged Gianluca Marotta requested to merge CT-215 into master
1 file
+ 33
1
Compare changes
  • Side-by-side
  • Inline
@@ -188,6 +188,36 @@ class TestCspSubarray(TestBase):
Poller(4, 0.2).check(prober_subarray_state)
prober_subarray_obsstate = Probe(self.midcsp_subarray01, "obsState", ObsState.EMPTY, f"CSP Subarray not EMPTY")
Poller(4, 0.2).check(prober_subarray_obsstate)
def test_re_initialization_AFTER_resourcing(self):
"""
Test for re-initialization of mid-csp device after killing the Tango device.
The CspSubarray align to the state/obsstate of CBFSubarray: ON/IDLE
"""
self._setup_subarray()
json_config= self._build_resources([1,2])
self.midcsp_subarray01.AssignResources(json_config)
prober_subarray_obsstate = Probe(self.midcsp_subarray01, "obsState", ObsState.IDLE, f"CSP Subarray not IDLE")
# open a proxy to the adminstrative server
dserver_proxy = tango.DeviceProxy(self.midcsp_subarray01.adm_name())
dserver_proxy. devrestart('mid_csp/elt/subarray_01')
"""
timeout = 60
starting_time = time.time()
while (time.time() - starting_time)<timeout:
try:
dserver_proxy.state()
break
except:
pass
"""
prober_subarray_state = Probe(self.midcsp_subarray01, "State", DevState.ON, f"CSP Subarray not ON after re-initialization")
Poller(10, 0.2).check(prober_subarray_state)
prober_subarray_obsstate = Probe(self.midcsp_subarray01, "obsState", ObsState.IDLE, f"CSP Subarray not IDLE after re-initialization")
Poller(4, 0.2).check(prober_subarray_obsstate)
def test_subarray_state_AFTER_on_command_execution(self):
@@ -218,6 +248,7 @@ class TestCspSubarray(TestBase):
prober_subarray_obsstate = Probe(self.midcsp_subarray01, "obsState", ObsState.EMPTY, f"CSP Subarray not EMPTY")
Poller(4, 0.2).check(prober_subarray_obsstate)
receptors = self.midcsp_subarray01.assignedReceptors
LOGGER.info(f'list of receptors{receptors}')
assert not receptors.any(), f"CSP Subarray is not empty"
def test_OffCommand_after_IDLE(self):
@@ -266,7 +297,8 @@ class TestCspSubarray(TestBase):
Poller(10, 0.2).check(prober_subarray_obsstate)
receptors = self.midcsp_subarray01.assignedReceptors
assert not receptors.any(), f"CSP Subarray is not empty"
@pytest.mark.off
def test_OffCommand_after_SCANNING(self):
"""
Test that the Off command send the device in OFF-EMPTY
Loading