mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 18:47:20 +01:00
admin: wait for the failed record in the worker-restart orphan test (#13079)
handleJobCompleted hands the completion to the dispatcher before it updates the tracked job, so the test could read the record while it still said assigned. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2e81c0b7c0
commit
df98e9df3e
1 file changed
+3
-6
@@ -110,12 +110,9 @@ func TestExecutionFailsWhenWorkerRestartsWithoutJob(t *testing.T) {
|
||||
t.Fatal("dispatch was not failed after its worker restarted without the job")
|
||||
}
|
||||
|
||||
tracked, ok := p.GetTrackedJob(jobID)
|
||||
if !ok || tracked == nil {
|
||||
t.Fatalf("job %s is not tracked", jobID)
|
||||
}
|
||||
if tracked.State != StateFailed || tracked.RequestID != requestID {
|
||||
t.Fatalf("expected request %s failed, got state=%s request=%s", requestID, tracked.State, tracked.RequestID)
|
||||
// the dispatcher gets the completion before the record is updated
|
||||
if tracked := waitTrackedState(t, p, jobID, StateFailed); tracked.RequestID != requestID {
|
||||
t.Fatalf("expected request %s failed, got request %s", requestID, tracked.RequestID)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user