brokerd: state.sock answers memoryd's question about a session's state
Co-Authored-By: ornith-1.5-35b-a3b <agent@wntrmute.dev>
This commit is contained in:
@@ -63,7 +63,9 @@ impl Home {
|
||||
command
|
||||
}
|
||||
|
||||
/// Starts `brokerd serve` and waits until both sockets answer.
|
||||
/// Starts `brokerd serve` and waits until both sockets answer. A socket accepts connections
|
||||
/// as soon as it is bound, before `brokerd` has printed its startup notices; the admin
|
||||
/// socket's answer comes from a handler thread, which runs only after they are printed.
|
||||
fn serve(&self) -> Running {
|
||||
let child = self
|
||||
.command(&[])
|
||||
@@ -79,6 +81,11 @@ impl Home {
|
||||
assert!(Instant::now() < until, "brokerd never listened");
|
||||
std::thread::sleep(Duration::from_millis(20));
|
||||
}
|
||||
let answer = exchange(&self.admin(), 1, Message::Approvals(Empty {}));
|
||||
assert!(
|
||||
matches!(&answer[0].msg, Message::ApprovalList(_)),
|
||||
"{answer:?}"
|
||||
);
|
||||
running
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user