File tree Expand file tree Collapse file tree
openshell-supervisor-middleware/src
openshell-supervisor-network/src
examples/supervisor-middleware-content-guard/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1371,11 +1371,10 @@ mod tests {
13711371 } else {
13721372 4096
13731373 } ,
1374- timeout: if matches!( self . script, Script :: HangBody ) {
1375- "10ms" . into( )
1376- } else {
1377- String :: new( )
1378- } ,
1374+ request_timeout: matches!( self . script, Script :: HangBody ) . then( || {
1375+ openshell_core:: time:: duration_from_std( Duration :: from_millis( 10 ) )
1376+ . expect( "test timeout is in protobuf range" )
1377+ } ) ,
13791378 } ] ,
13801379 expected_audience : String :: new ( ) ,
13811380 }
@@ -1715,7 +1714,7 @@ mod tests {
17151714 as i32 ,
17161715 phase: openshell_core:: proto:: SupervisorMiddlewarePhase :: PreReturn as i32 ,
17171716 max_payload_bytes: 4096 ,
1718- timeout : String :: new ( ) ,
1717+ request_timeout : None ,
17191718 } ] ,
17201719 expected_audience : String :: new ( ) ,
17211720 }
@@ -1921,7 +1920,10 @@ mod tests {
19211920 impl InProcessMiddleware for ReadPreflightBeforeOpening {
19221921 async fn describe ( & self ) -> MiddlewareManifest {
19231922 let mut manifest = response_manifest ( "test/response" ) ;
1924- manifest. bindings [ 0 ] . timeout = "10ms" . into ( ) ;
1923+ manifest. bindings [ 0 ] . request_timeout = Some (
1924+ openshell_core:: time:: duration_from_std ( Duration :: from_millis ( 10 ) )
1925+ . expect ( "test timeout is in protobuf range" ) ,
1926+ ) ;
19251927 manifest
19261928 }
19271929
Original file line number Diff line number Diff line change @@ -3606,7 +3606,7 @@ mod tests {
36063606 SupervisorMiddlewarePhase :: PreReturn
36073607 } as i32 ,
36083608 max_payload_bytes: 4096 ,
3609- timeout : String :: new ( ) ,
3609+ request_timeout : None ,
36103610 } ] ,
36113611 expected_audience : String :: new ( ) ,
36123612 }
Original file line number Diff line number Diff line change @@ -6777,7 +6777,7 @@ process:
67776777 as i32 ,
67786778 phase: openshell_core:: proto:: SupervisorMiddlewarePhase :: PreReturn as i32 ,
67796779 max_payload_bytes: 8192 ,
6780- timeout : String :: new ( ) ,
6780+ request_timeout : None ,
67816781 } ] ,
67826782 expected_audience : String :: new ( ) ,
67836783 }
Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ impl SupervisorMiddleware for ContentGuard {
252252 operation: SupervisorMiddlewareOperation :: HttpResponse as i32 ,
253253 phase: SupervisorMiddlewarePhase :: PreReturn as i32 ,
254254 max_payload_bytes: MAX_PAYLOAD_BYTES ,
255- timeout : String :: new ( ) ,
255+ request_timeout : None ,
256256 } ,
257257 ] ,
258258 expected_audience : String :: new ( ) ,
You can’t perform that action at this time.
0 commit comments