martin-g commented on code in PR #1693:
URL:
https://github.com/apache/datafusion-ballista/pull/1693#discussion_r3226360470
##########
ballista/scheduler/src/state/aqe/mod.rs:
##########
Review Comment:
```suggestion
self.end_time = timestamp_millis();
```
##########
ballista/scheduler/src/state/execution_graph.rs:
##########
Review Comment:
```suggestion
self.end_time = timestamp_millis();
```
##########
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:
```suggestion
"end_time ({}) should be set and >= 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]