File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
compiler/base/orchestrator/src Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -2846,6 +2846,11 @@ mod tests {
2846
2846
Ok ( ( ) )
2847
2847
}
2848
2848
2849
+ static TIMEOUT : Lazy < Duration > = Lazy :: new ( || {
2850
+ let millis = env:: var ( "TESTS_TIMEOUT_MS" ) . ok ( ) . and_then ( |v| v. parse ( ) . ok ( ) ) . unwrap_or ( 5000 ) ;
2851
+ Duration :: from_millis ( millis)
2852
+ } ) ;
2853
+
2849
2854
trait TimeoutExt : Future + Sized {
2850
2855
#[ allow( clippy:: type_complexity) ]
2851
2856
fn with_timeout (
@@ -2854,7 +2859,7 @@ mod tests {
2854
2859
tokio:: time:: Timeout < Self > ,
2855
2860
fn ( Result < Self :: Output , tokio:: time:: error:: Elapsed > ) -> Self :: Output ,
2856
2861
> {
2857
- tokio:: time:: timeout ( Duration :: from_millis ( 5000 ) , self )
2862
+ tokio:: time:: timeout ( * TIMEOUT , self )
2858
2863
. map ( |v| v. expect ( "The operation timed out" ) )
2859
2864
}
2860
2865
}
You can’t perform that action at this time.
0 commit comments