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
25 changes: 15 additions & 10 deletions crates/openshell-server/src/grpc/sandbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2636,16 +2636,21 @@ mod tests {

let traced = test_exporter::install_traced();
let request_span = tracing::info_span!("disconnected_watch_request");
let response = handle_watch_sandbox(
&state,
authed_request(WatchSandboxRequest {
id: sandbox.object_id().to_string(),
..Default::default()
}),
)
.instrument(request_span.clone())
.await
.unwrap();
let mut handler = Box::pin(
handle_watch_sandbox(
&state,
authed_request(WatchSandboxRequest {
id: sandbox.object_id().to_string(),
..Default::default()
}),
)
.instrument(request_span.clone()),
);
let response = handler.as_mut().await.unwrap();
// A completed instrumented future can retain its span until the future
// itself is dropped. Release the handler's clone so this test isolates
// whether the spawned watch producer retains the request span.
drop(handler);
let mut stream = response.into_inner();
stream
.next()
Expand Down
Loading