Skip to content
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
4ba4f12
Update to ophyd-async v0.20
oliwenmandiamond Jul 17, 2026
7ccbc28
Update naming issue
oliwenmandiamond Jul 17, 2026
8f040e2
Update remaining tests that are not bluesky verb errors
oliwenmandiamond Jul 17, 2026
d5c165f
Fix apple2 mock_config:_client errors
oliwenmandiamond Jul 17, 2026
572edb6
update comment
oliwenmandiamond Jul 17, 2026
ab0dbcf
Remove unneeded connects
oliwenmandiamond Jul 17, 2026
83d0d5b
Fix fasteiger test
oliwenmandiamond Jul 17, 2026
e82b298
Merge branch 'main' into update_to_ophyd_async_0_20
oliwenmandiamond Jul 17, 2026
bdbeec8
Update to use 0.21 and use env variable
oliwenmandiamond Jul 22, 2026
377f5d4
Fix ConfigClient issue
oliwenmandiamond Jul 22, 2026
58674a5
Merge branch 'main' into update_to_ophyd_async_0_20
oliwenmandiamond Jul 22, 2026
b011acc
Bump ophyd-async pin to >=0.20.1 and fix set_mock_attr test failures
claude Jul 22, 2026
dba111c
Remove temporary OPHYD_ASYNC_ALLOW_RESERVED_ATTRS mask
claude Jul 22, 2026
7fc58a4
Fix pyright regression from set_mock_attr changes
claude Jul 22, 2026
2f89975
Merge branch 'main' into update_to_ophyd_async_0_20
oliwenmandiamond Jul 29, 2026
6b424b6
Merge branch 'update_to_ophyd_async_0_20' of ssh://github.com/Diamond…
oliwenmandiamond Jul 29, 2026
96a52b9
Fix flakey undulator dcm test
oliwenmandiamond Jul 29, 2026
8c6f719
Removed event_loop_fuzzing
oliwenmandiamond Jul 29, 2026
cc4c9c8
Merge branch 'main' into fix_flakey_undulator_dcm_test
oliwenmandiamond Jul 29, 2026
e52ddd9
Merge branch 'main' into fix_flakey_undulator_dcm_test
oliwenmandiamond Aug 24, 2026
36eeeb1
Merge branch 'main' into fix_flakey_undulator_dcm_test
oliwenmandiamond Aug 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions tests/devices/beamlines/i03/test_undulator_dcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,6 @@ async def test_dcm_offset_only_set_when_energy_set_completes(
async def test_energy_set_only_complete_when_all_statuses_are_finished(
fake_undulator_dcm: UndulatorDCM,
):
set_mock_value(fake_undulator_dcm.undulator_ref().current_gap, 5.0)

release_dcm = asyncio.Event()
release_undulator = asyncio.Event()

Expand All @@ -234,16 +232,17 @@ async def test_energy_set_only_complete_when_all_statuses_are_finished(
"set",
MagicMock(return_value=AsyncStatus(release_undulator.wait())),
)

status = fake_undulator_dcm.set(5.0)
done, _ = await asyncio.wait([status.task], timeout=0.1)
assert not done

await asyncio.wait([status.task], timeout=0.1) # type: ignore
assert not status.done
release_dcm.set()
await asyncio.wait([status.task], timeout=0.1) # type: ignore
assert not status.done
done, _ = await asyncio.wait([status.task], timeout=0.1)
assert not done

release_undulator.set()
await asyncio.wait_for(status, timeout=0.02)
done, _ = await asyncio.wait([status.task], timeout=0.1)
assert status.task in done

Comment on lines +244 to 246

@Relm-Arrowny Relm-Arrowny Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: The cause of the flakey test was the timeout being too short, we could have just change it to 0.1 and it would have fixed it.

Suggested change
done, _ = await asyncio.wait([status.task], timeout=0.1)
assert status.task in done
await status
assert status.done

Or

    await asyncio.wait_for(status, timeout=0.1)

New code still fail with old timeout:
Image


async def test_when_undulator_gap_is_disabled_setting_energy_errors_and_dcm_energy_is_not_set(
Expand Down
Loading