File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed
compiler/base/orchestrator/src Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -224,6 +224,7 @@ jobs:
224224 - name : Run orchestrator unit tests
225225 env :
226226 TESTS_MAX_CONCURRENCY : 3
227+ TESTS_TIMEOUT_MS : 30000
227228 run : chmod +x ./server/unit_tests_orchestrator && ./server/unit_tests_orchestrator
228229 - name : Run ui unit tests
229230 run : chmod +x ./server/unit_tests_ui && ./server/unit_tests_ui
Original file line number Diff line number Diff line change @@ -314,6 +314,7 @@ workflows:
314314 - name : " Run orchestrator unit tests"
315315 env :
316316 TESTS_MAX_CONCURRENCY : 3
317+ TESTS_TIMEOUT_MS : 30000
317318 run : |-
318319 chmod +x ./server/unit_tests_orchestrator && ./server/unit_tests_orchestrator
319320
Original file line number Diff line number Diff line change @@ -2846,6 +2846,14 @@ mod tests {
28462846 Ok ( ( ) )
28472847 }
28482848
2849+ static TIMEOUT : Lazy < Duration > = Lazy :: new ( || {
2850+ let millis = env:: var ( "TESTS_TIMEOUT_MS" )
2851+ . ok ( )
2852+ . and_then ( |v| v. parse ( ) . ok ( ) )
2853+ . unwrap_or ( 5000 ) ;
2854+ Duration :: from_millis ( millis)
2855+ } ) ;
2856+
28492857 trait TimeoutExt : Future + Sized {
28502858 #[ allow( clippy:: type_complexity) ]
28512859 fn with_timeout (
@@ -2854,8 +2862,7 @@ mod tests {
28542862 tokio:: time:: Timeout < Self > ,
28552863 fn ( Result < Self :: Output , tokio:: time:: error:: Elapsed > ) -> Self :: Output ,
28562864 > {
2857- tokio:: time:: timeout ( Duration :: from_millis ( 5000 ) , self )
2858- . map ( |v| v. expect ( "The operation timed out" ) )
2865+ tokio:: time:: timeout ( * TIMEOUT , self ) . map ( |v| v. expect ( "The operation timed out" ) )
28592866 }
28602867 }
28612868
You can’t perform that action at this time.
0 commit comments