Commit 57a56cee authored by Elisabetta Giani's avatar Elisabetta Giani
Browse files

AT5-259: Removed a bug from RemoveAllReceptors() method.

Renamed MID tangoDB docker-compose file.
parent 09f083bd
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ class MidCspSubarrayBase(with_metaclass(DeviceMeta, CspSubarray)):
            try:
                receptors = device_proxy.receptors
            except AttributeError as attr_err:
                self.logger.warn("RemoveReceptors:",str(attr_err))
                self.logger.warn("RemoveReceptors:{}"-format(str(attr_err)))
            if len(receptors):
                # get the ids in receptor_list that are no more present in receptors
                receptors_removed = [value for value in receptor_list if value not in receptors]
@@ -156,6 +156,9 @@ class MidCspSubarrayBase(with_metaclass(DeviceMeta, CspSubarray)):
                    self._cmd_duration_measured[cmd_name] = (time.time() - self._sc_subarray_cmd_starting_time[device])
                    self.logger.info("Receptors {} have been successfully removed".format(receptor_list))
                    break
            else:
                self.logger.info("Receptors already successfully removed".format(receptor_list))
                break
            # check if sub-element command ended throwing an exception: in this case the
            # 'cmd_ended_cb' callback is invoked.
            if self._sc_subarray_cmd_exec_state[device][cmd_name] == CmdExecState.FAILED:
+2 −2
Original line number Diff line number Diff line
@@ -153,10 +153,10 @@ endif
	#$(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) pull
	#to pull only the mid-cbf-mcs image remove comment on row below.
	#docker pull $(DOCKER_REGISTRY_HOST)/$(DOCKER_REGISTRY_USER)/mid-cbf-mcs:latest
	$(DOCKER_COMPOSE_ARGS) docker-compose -f csp-tangodb.yml up -d
	$(DOCKER_COMPOSE_ARGS) docker-compose -f mid-csp-tangodb.yml up -d
	# put a sleep to wait TANGO DB 
	@sleep 10
	$(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) up 
	$(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) up -d 

piplock: build  ## overwrite Pipfile.lock with the image version
	docker run $(IMAGE_TO_TEST) cat /app/Pipfile.lock > $(CURDIR)/Pipfile.lock
+1 −1
Original line number Diff line number Diff line
@@ -297,7 +297,7 @@ class TestCspSubarray(object):
            midcsp_subarray01.RemoveAllReceptors()
        if df:
            err_msg = str(df.value.args[0].desc)
            assert "Command RemoveAllReceptors not allowed" in err_msg
            assert "RemoveAllReceptors command can't be issued when the obsState is READY" in err_msg
        
    def test_remove_receptors_when_idle(self, midcsp_subarray01):
        """