villebro commented on code in PR #2607:
URL: 
https://github.com/apache/datafusion-ballista/pull/2607#discussion_r4286675002


##########
ballista/executor/src/executor_process.rs:
##########
@@ -1240,6 +1238,36 @@ mod tests {
         );
     }
 
+    #[tokio::test]
+    async fn scheduler_connect_timeout_is_honoured() {
+        // Reserve a port and release it, so nothing listens there.
+        let scheduler_port = std::net::TcpListener::bind("127.0.0.1:0")
+            .unwrap()
+            .local_addr()
+            .unwrap()
+            .port();
+        let config = Arc::new(ExecutorProcessConfig {
+            scheduler_host: "127.0.0.1".to_string(),
+            scheduler_port,
+            scheduler_connect_timeout_seconds: 1,
+            ..ExecutorProcessConfig::default()
+        });
+
+        let result = tokio::time::timeout(
+            Duration::from_secs(30),

Review Comment:
   nit: since a regression would hang the test for 30s, could we maybe decrease 
this to something like 5s, as that should be enough time to reach a timeout 
with `scheduler_connect_timeout_seconds` set to 1?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to