Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mx-bluesky unit tests taking ~3x longer since signal-typing changes #640

Closed
rtuck99 opened this issue Nov 6, 2024 · 3 comments
Closed

Comments

@rtuck99
Copy link
Contributor

rtuck99 commented Nov 6, 2024

Since updating mx-bluesky to be compatible with #594, the unit tests are taking significantly longer to complete.
On my desktop machine the difference is ~97s to complete compared to ~27s before

It seems that most of this slowdown is due to waiting in call_in_bluesky_event_loop() waiting for wait_for_connection(coros=device.connect(mock=True)) to complete.

Can this be made faster?

@coretl
Copy link
Collaborator

coretl commented Nov 6, 2024

Can you post a typical test please?

@olliesilvester
Copy link
Contributor

See https://github.com/DiamondLightSource/mx-bluesky/blob/3845a51a2f083c578b92476702950f4125813b4b/tests/unit_tests/beamlines/i04/test_thawing.py#L118 for a typical test

In our tests, devices are created through fixtures which look like
smargon = i03.smargon(fake_with_ophyd_sim=True)

which in turn calls
call_in_bluesky_event_loop(...) and the ophyd-async wait_for_connection(..)

@DominicOram
Copy link
Contributor

I'm happy this is fixed by #641

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants