Skip to content

Commit 7c22096

Browse files
Merge pull request #13 from DiamondLightSource/fix-exp-time
Wait on prepare when setting exposure time
2 parents b6cb69b + 263564e commit 7c22096

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

configuration/b01-1-blueapi-client.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,5 @@ stomp:
44
auth:
55
username: guest
66
password: guest
7-
url: http://b01-1-rabbitmq-daq.diamond.ac.uk:61613
7+
url: tcp://b01-1-rabbitmq-daq.diamond.ac.uk:61613
88
enabled: true
9-
oidc:
10-
well_known_url: https://authn.diamond.ac.uk/realms/master/.well-known/openid-configuration
11-
client_id: blueapi-cli

src/test_rig_bluesky/plans.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ def spectroscopy(
3535
metadata: dict[str, Any] | None = None,
3636
) -> MsgGenerator[None]:
3737
"""Do a spectroscopy scan."""
38-
yield from bps.prepare(spectroscopy_detector, TriggerInfo(livetime=exposure_time))
38+
yield from bps.prepare(
39+
spectroscopy_detector, TriggerInfo(livetime=exposure_time), wait=True
40+
)
3941

4042
spec = spec or Line(sample_stage.x, 0, 5, 5)
4143

tests/unit_tests/test_plans.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,11 @@ async def test_spectroscopy_defaults(RE: RunEngine):
124124
"sample_stage-y": 0.0,
125125
"sample_stage-z": 0.0,
126126
}
127+
128+
129+
def test_spectroscopy_prepares_and_waits_before_doing_anything_else(RE: RunEngine):
130+
plan = spectroscopy()
131+
message_1, message_2 = next(plan), next(plan)
132+
133+
assert message_1.command == "prepare"
134+
assert message_2.command == "wait"

0 commit comments

Comments
 (0)