DiamondLightSource / hyperion

Unattended Data Collection using BlueSky / Ophyd
BSD 3-Clause "New" or "Revised" License
6 stars 5 forks source link

test_can_stage_and_unstage_eiger fails intermittently with S03 #316

Closed dperl-dls closed 1 year ago

dperl-dls commented 1 year ago

S03 filewriters always stay in error and this is supposed to be dealt with in the test by eiger.odin.check_odin_initialised = lambda: (True, "") but nonetheless the test sometimes fails with this error

./src/artemis/devices/system_tests/test_eiger_system.py::test_can_stage_and_unstage_eiger Failed: [undefined]Exception: Odin not initialised: Filewriter 0 is in an error state with error message                     - Timed out waiting for frames, stopping writing (1/1)
eiger = EigerDetector(prefix='BL03S-EA-EIGER-01:', name='eiger', read_attrs=['cam', 'odin', 'odin.fan', 'odin.fan.on', 'odin.f...riter', 'odin.meta', 'odin.nodes', 'odin.nodes.node_0', 'odin.nodes.node_1', 'odin.nodes.node_2', 'odin.nodes.node_3'])

    @pytest.mark.s03
    def test_can_stage_and_unstage_eiger(eiger: EigerDetector):
>       eiger.stage()

src/artemis/devices/system_tests/test_eiger_system.py:36: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = EigerDetector(prefix='BL03S-EA-EIGER-01:', name='eiger', read_attrs=['cam', 'odin', 'odin.fan', 'odin.fan.on', 'odin.f...riter', 'odin.meta', 'odin.nodes', 'odin.nodes.node_0', 'odin.nodes.node_1', 'odin.nodes.node_2', 'odin.nodes.node_3'])

    def stage(self):
        self.odin.nodes.clear_odin_errors()
        status_ok, error_message = self.odin.check_odin_initialised()
        if not status_ok:
>           raise Exception(f"Odin not initialised: {error_message}")
E           Exception: Odin not initialised: Filewriter 0 is in an error state with error message                     - Timed out waiting for frames, stopping writing (1/1)

src/artemis/devices/eiger.py:59: Exception
DominicOram commented 1 year ago

We should understand this and fix it properly in s03 rather than hack in the test

dperl-dls commented 1 year ago

Closed because this is obsolete - with changes in DiamondLightSource/hyperion#404 it always fails; DiamondLightSource/mx-bluesky#383 is the new issue to fix this.