refactor: remove cycle checking becuase API prevents cycles
This commit is contained in:
11 files changed
+543
-75
No files matched your search
+10
-14
@@ -44,20 +44,6 @@ fn test_dag_error_display_task_panicked() {
|
||||
assert!(display.contains("entire DAG execution is aborted"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_dag_error_display_cycle_detected() {
|
||||
let err = DagError::CycleDetected {
|
||||
nodes: vec![1, 2, 3, 1],
|
||||
description: "A->B->C->A".to_string(),
|
||||
};
|
||||
let display = format!("{}", err);
|
||||
|
||||
assert!(display.contains("Cycle detected"));
|
||||
assert!(display.contains("A->B->C->A"));
|
||||
assert!(display.contains("[1, 2, 3, 1]"));
|
||||
assert!(display.contains("cannot have cycles"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_dag_error_display_result_not_found() {
|
||||
let err = DagError::ResultNotFound { task_id: 7 };
|
||||
@@ -68,6 +54,16 @@ fn test_dag_error_display_result_not_found() {
|
||||
assert!(display.contains("Call dag.run()"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_dag_error_display_concurrent_execution() {
|
||||
let err = DagError::ConcurrentExecution;
|
||||
let display = format!("{}", err);
|
||||
|
||||
assert!(display.contains("already running"));
|
||||
assert!(display.contains("concurrent execution not supported"));
|
||||
assert!(display.contains("Wait for the current execution"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_dag_error_std_error_impl() {
|
||||
// Test that DagError implements std::error::Error
|
||||
|
||||
Reference in new issue
Block a user