abhinavgautam01 commented on code in PR #1693:
URL: 
https://github.com/apache/datafusion-ballista/pull/1693#discussion_r3226779847


##########
ballista/scheduler/src/state/execution_graph.rs:
##########
@@ -1772,6 +1774,38 @@ mod test {
         test_union_all_plan, test_union_plan,
     };
 
+    #[tokio::test]
+    async fn test_fail_job_sets_end_time_and_failed_metadata() -> Result<()> {
+        let mut graph = test_aggregation_plan(4).await;
+        let start = graph.start_time();
+        assert_eq!(graph.end_time(), 0);
+
+        ExecutionGraph::fail_job(&mut graph, "test failure".to_string());
+
+        assert!(
+            matches!(
+                graph.status().status.as_ref(),
+                Some(job_status::Status::Failed(f)) if f.error == "test 
failure"
+            ),
+            "expected FailedJob status after fail_job"
+        );
+        assert!(
+            graph.end_time() >= start,
+            "end_time {} should be set and >= start_time {}",

Review Comment:
   done, the assertion panic message now uses parentheses: end_time ({}) ... 
start_time ({})...



-- 
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