mirror of
https://github.com/openai/codex.git
synced 2026-05-03 19:06:58 +00:00
Simplify exec-server client backends
Extract local and JSON-RPC backend helpers, collapse the remaining local-or-remote dispatch into one generic request helper, and keep the process test helper in its own module. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -250,12 +250,7 @@ async fn connect_in_process_rejects_writes_to_unknown_processes() {
|
||||
Err(err) => panic!("failed to connect in-process client: {err}"),
|
||||
};
|
||||
|
||||
let result = client
|
||||
.write_process(crate::protocol::WriteParams {
|
||||
process_id: "missing".to_string(),
|
||||
chunk: b"input".to_vec().into(),
|
||||
})
|
||||
.await;
|
||||
let result = client.write("missing", b"input".to_vec()).await;
|
||||
|
||||
match result {
|
||||
Err(ExecServerError::Server { code, message }) => {
|
||||
@@ -290,7 +285,7 @@ async fn connect_in_process_terminate_marks_process_exited() {
|
||||
Err(err) => panic!("failed to start in-process child: {err}"),
|
||||
};
|
||||
|
||||
if let Err(err) = client.terminate_session(&process.process_id).await {
|
||||
if let Err(err) = client.terminate(&process.process_id).await {
|
||||
panic!("failed to terminate in-process child: {err}");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user