File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
compiler/base/orchestrator/src Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -1913,6 +1913,32 @@ mod tests {
1913
1913
Ok ( ( ) )
1914
1914
}
1915
1915
1916
+ #[ tokio:: test]
1917
+ #[ snafu:: report]
1918
+ async fn test_still_usable_after_idle ( ) -> Result < ( ) > {
1919
+ let mut coordinator = new_coordinator ( ) . await ;
1920
+
1921
+ let req = ExecuteRequest {
1922
+ channel : Channel :: Stable ,
1923
+ mode : Mode :: Debug ,
1924
+ edition : Edition :: Rust2021 ,
1925
+ crate_type : CrateType :: Binary ,
1926
+ tests : false ,
1927
+ backtrace : false ,
1928
+ code : r#"fn main() { println!("hello") }"# . into ( ) ,
1929
+ } ;
1930
+
1931
+ let res = coordinator. execute ( req. clone ( ) ) . await . unwrap ( ) ;
1932
+ assert_eq ! ( res. stdout, "hello\n " ) ;
1933
+
1934
+ coordinator. idle ( ) . await . unwrap ( ) ;
1935
+
1936
+ let res = coordinator. execute ( req) . await . unwrap ( ) ;
1937
+ assert_eq ! ( res. stdout, "hello\n " ) ;
1938
+
1939
+ Ok ( ( ) )
1940
+ }
1941
+
1916
1942
trait TimeoutExt : Future + Sized {
1917
1943
#[ allow( clippy:: type_complexity) ]
1918
1944
fn with_timeout (
You can’t perform that action at this time.
0 commit comments