diff --git a/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/js/external_process.rs b/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/js/external_process.rs index d3ccdbac511f..27ba29dfdedd 100644 --- a/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/js/external_process.rs +++ b/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/js/external_process.rs @@ -175,6 +175,7 @@ fn start_rpc_thread(mut receiver: mpsc::Receiver) -> Result<()> { let mut stdin = process.stdin.unwrap(); let mut pending_requests: HashMap>> = HashMap::new(); + let mut last_pending_request_id: Option = None; loop { tokio::select! { @@ -226,6 +227,8 @@ fn start_rpc_thread(mut receiver: mpsc::Receiver) -> Result<()> { } Some((request, response_sender)) => { pending_requests.insert(request.id.clone(), response_sender); + last_pending_request_id = Some(request.id.clone()); + let mut req = serde_json::to_vec(&request).unwrap(); req.push(b'\n'); stdin.write_all(&req).await.unwrap();