Update test error handling to use t.Fatal for critical execution checks
- Changed instances of t.Error to t.Fatal in job test files to ensure immediate test termination when no executions are found, improving test reliability and clarity.
This commit is contained in:
parent
5612fb58e2
commit
4ba2200d78
3 changed files with 3 additions and 5 deletions
|
|
@ -449,7 +449,7 @@ func TestWorkerManager(t *testing.T) {
|
|||
}
|
||||
|
||||
if len(executions) == 0 {
|
||||
t.Error("Expected at least one execution")
|
||||
t.Fatal("Expected at least one execution")
|
||||
}
|
||||
|
||||
// Check execution status
|
||||
|
|
|
|||
|
|
@ -125,8 +125,7 @@ func TestProgressWithExecution(t *testing.T) {
|
|||
t.Fatalf("Failed to get executions: %v", err)
|
||||
}
|
||||
if len(executions) == 0 {
|
||||
t.Error("Expected at least one execution")
|
||||
return
|
||||
t.Fatal("Expected at least one execution")
|
||||
}
|
||||
|
||||
execution := executions[0]
|
||||
|
|
|
|||
|
|
@ -240,8 +240,7 @@ func TestWorkerErrorHandling(t *testing.T) {
|
|||
t.Fatalf("Failed to get executions: %v", err)
|
||||
}
|
||||
if len(executions) == 0 {
|
||||
t.Error("Expected at least one execution")
|
||||
return
|
||||
t.Fatal("Expected at least one execution")
|
||||
}
|
||||
|
||||
execution := executions[0]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue