Wait for released workspace cleanup in retry isolation test

This commit is contained in:
2026-10-18 23:43:58 +01:00
parent 80a1d1e0ea
commit 80f8e2edc4
+3
View File
@@ -370,6 +370,9 @@ func TestRetryConflictsOnlyWithSameWorkspaceActiveRun(t *testing.T) {
t.Fatalf("retry did not conflict with same-workspace active run: %v", err)
}
close(releaseA)
// Execution returning does not instantly remove the workspace reservation.
// Finish A's cleanup before asserting that only the unrelated B is active.
r.wg.Wait()
// A different active workspace must not block the retry of the original.
if _, err := r.start(protocol.Message{PipelineID: pipelineID, Version: 1, RequestKey: "active-b", Workspace: b, Input: map[string]any{"prompt": "task"}}); err != nil {
t.Fatal(err)