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:
224
224
- name : Run orchestrator unit tests
225
225
env :
226
226
TESTS_MAX_CONCURRENCY : 3
227
+ TESTS_TIMEOUT_MS : 30000
227
228
run : chmod +x ./server/unit_tests_orchestrator && ./server/unit_tests_orchestrator
228
229
- name : Run ui unit tests
229
230
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:
314
314
- name : " Run orchestrator unit tests"
315
315
env :
316
316
TESTS_MAX_CONCURRENCY : 3
317
+ TESTS_TIMEOUT_MS : 30000
317
318
run : |-
318
319
chmod +x ./server/unit_tests_orchestrator && ./server/unit_tests_orchestrator
319
320
Original file line number Diff line number Diff line change @@ -2846,6 +2846,14 @@ mod tests {
2846
2846
Ok ( ( ) )
2847
2847
}
2848
2848
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
+
2849
2857
trait TimeoutExt : Future + Sized {
2850
2858
#[ allow( clippy:: type_complexity) ]
2851
2859
fn with_timeout (
@@ -2854,8 +2862,7 @@ mod tests {
2854
2862
tokio:: time:: Timeout < Self > ,
2855
2863
fn ( Result < Self :: Output , tokio:: time:: error:: Elapsed > ) -> Self :: Output ,
2856
2864
> {
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" ) )
2859
2866
}
2860
2867
}
2861
2868
You can’t perform that action at this time.
0 commit comments