Open sf-migrator-bot opened 10 years ago
Original comment by: cpascual (http://sf.net/u/cpascual)
Original comment by: reszelaz (http://sf.net/u/zreszela)
Does this only affect the tests, or might it happen in normal use as well? It if's only for tests, I would lower the impact to low.
I agree with @HEnquist : my impact estimation is assuming that this is actually triggerable in real life conditions. Otherwise, impact:low
A sequence of macro tests can be interrupted with a DevFailed error of the door: "Command RunMacro not allowed when the device is in RUNNING state".
After a little of investigation I think that it happens due to a time gap between emitting MacroStatus event indicating the termination of a macro (with state equal to 'finish' or 'exception') and change of the door tango device state (from RUNNING to ON or ALARM).
Since the TangoMacroExecutor synchronization is based on the events of the MacroStatus attribute, this can lead to a situation where a subsequent test is already started, and the door is still in the RUNNING state from the previous test.
One can reproduce it easily with the loopTest function from the taurus.test module.
As a stupid workaround I've used a 3 second sleep (it's very exaggerated) before the line 161 of sardana/tango/macroserver/macroexecutor.py.
Reported by: reszelaz ( http://sf.net/u/zreszela )
Original Ticket: sardana/tickets/227