Skip to content
Merged
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions crates/botloftd/tests/rpc_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ async fn race(c: &mut Crew, request: Value) -> Vec<&'static str> {
});
is_locked.recv().expect("store held");
c.app.send_raw(&request.to_string()).await;
// Give the daemon time to take the request off the socket, so the text
// comes after it. Nothing shows when it has, but this is far below the
// time the store is held. A thread sleep, because the runtime's timers
// may not fire while the daemon's tasks wait for the store.
std::thread::sleep(Duration::from_millis(200));
// The block that ends sends the text at once, without the timer.
let stop =
json!({ "type": "stream_event", "event": { "type": "content_block_stop", "index": 0 } });
Expand Down
Loading