File tree Expand file tree Collapse file tree 4 files changed +10
-20
lines changed
app-server/tests/suite/v2 Expand file tree Collapse file tree 4 files changed +10
-20
lines changed Original file line number Diff line number Diff line change @@ -39,11 +39,7 @@ use tokio::net::TcpListener;
3939use tokio:: task:: JoinHandle ;
4040use tokio:: time:: timeout;
4141
42- const DEFAULT_READ_TIMEOUT : Duration = if cfg ! ( windows) {
43- Duration :: from_secs ( 30 )
44- } else {
45- Duration :: from_secs ( 10 )
46- } ;
42+ const DEFAULT_READ_TIMEOUT : Duration = Duration :: from_secs ( 10 ) ;
4743const TEST_SERVER_NAME : & str = "tool_server" ;
4844const TEST_TOOL_NAME : & str = "echo_tool" ;
4945
Original file line number Diff line number Diff line change @@ -43,11 +43,7 @@ use super::analytics::enable_analytics_capture;
4343use super :: analytics:: thread_initialized_event;
4444use super :: analytics:: wait_for_analytics_payload;
4545
46- const DEFAULT_READ_TIMEOUT : std:: time:: Duration = if cfg ! ( windows) {
47- std:: time:: Duration :: from_secs ( 30 )
48- } else {
49- std:: time:: Duration :: from_secs ( 10 )
50- } ;
46+ const DEFAULT_READ_TIMEOUT : std:: time:: Duration = std:: time:: Duration :: from_secs ( 10 ) ;
5147
5248#[ tokio:: test]
5349async fn thread_fork_creates_new_thread_and_emits_started ( ) -> Result < ( ) > {
Original file line number Diff line number Diff line change @@ -188,17 +188,14 @@ async fn list_tool_suggest_discoverable_plugins_does_not_reload_marketplace_per_
188188 assert_eq ! ( discoverable_plugins[ 0 ] . id, "slack@openai-curated" ) ;
189189
190190 let logs = String :: from_utf8 ( buffer. lock ( ) . expect ( "buffer lock" ) . clone ( ) ) . expect ( "utf8 logs" ) ;
191- let normalized_logs = logs. replace ( '\\' , "/" ) ;
192191 assert_eq ! ( logs. matches( "ignoring interface.defaultPrompt" ) . count( ) , 2 ) ;
193192 assert_eq ! (
194- normalized_logs
195- . matches( "build-ios-apps/.codex-plugin/plugin.json" )
193+ logs. matches( "build-ios-apps/.codex-plugin/plugin.json" )
196194 . count( ) ,
197195 1
198196 ) ;
199197 assert_eq ! (
200- normalized_logs
201- . matches( "life-science-research/.codex-plugin/plugin.json" )
198+ logs. matches( "life-science-research/.codex-plugin/plugin.json" )
202199 . count( ) ,
203200 1
204201 ) ;
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ use tempfile::TempDir;
2929const PARENT_PROMPT : & str = "spawn a subagent and report when it is started" ;
3030const CHILD_PROMPT : & str = "child: say done" ;
3131const SPAWN_CALL_ID : & str = "spawn-call-1" ;
32- const PROXY_START_TIMEOUT : Duration = Duration :: from_secs ( /*secs*/ 15 ) ;
32+ const PROXY_START_TIMEOUT : Duration = Duration :: from_secs ( /*secs*/ 5 ) ;
3333const PROXY_POLL_INTERVAL : Duration = Duration :: from_millis ( /*millis*/ 20 ) ;
3434
3535struct ResponsesApiProxy {
@@ -58,10 +58,11 @@ impl ResponsesApiProxy {
5858
5959 let deadline = Instant :: now ( ) + PROXY_START_TIMEOUT ;
6060 loop {
61- if let Ok ( info) = std:: fs:: read_to_string ( & server_info)
62- && let Ok ( value) = serde_json:: from_str :: < Value > ( & info)
63- && let Some ( port) = value. get ( "port" ) . and_then ( Value :: as_u64)
64- {
61+ if let Ok ( info) = std:: fs:: read_to_string ( & server_info) {
62+ let port = serde_json:: from_str :: < Value > ( & info) ?
63+ . get ( "port" )
64+ . and_then ( Value :: as_u64)
65+ . ok_or_else ( || anyhow ! ( "proxy server info missing port" ) ) ?;
6566 return Ok ( Self {
6667 child,
6768 port : u16:: try_from ( port) ?,
You can’t perform that action at this time.
0 commit comments