From f3f48eae4e5c0781888542575e7848d4aeecae2d Mon Sep 17 00:00:00 2001 From: matdev83 Date: Fri, 4 Sep 2026 14:07:02 +0200 Subject: [PATCH] test(runtime): isolate parallel stream assembly state --- .../runtime/executor_assemble_stream_test.go | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/internal/core/runtime/executor_assemble_stream_test.go b/internal/core/runtime/executor_assemble_stream_test.go index 7e15fbe2..9729952f 100644 --- a/internal/core/runtime/executor_assemble_stream_test.go +++ b/internal/core/runtime/executor_assemble_stream_test.go @@ -23,13 +23,14 @@ func TestAssembleExecutorStream_WrapperSelection(t *testing.T) { if err != nil { t.Fatal(err) } - progress := newRecoveryController(recoveryControllerInput{ - budget: &attemptBudget{max: 3}, - sel: sel, - }) - plan := &routePlanState{ - routeFacts: routeFacts{sel: sel}, - progress: progress, + newPlan := func() *routePlanState { + return &routePlanState{ + routeFacts: routeFacts{sel: sel}, + progress: newRecoveryController(recoveryControllerInput{ + budget: &attemptBudget{max: 3}, + sel: sel, + }), + } } newPrep := func() *preparedRequest { call := &lipapi.Call{ @@ -82,7 +83,7 @@ func TestAssembleExecutorStream_WrapperSelection(t *testing.T) { t.Parallel() localPrep := newPrep() ex := TestExecutor() - got, err := ex.assembleExecutorStream(context.Background(), localPrep, plan, out) + got, err := ex.assembleExecutorStream(context.Background(), localPrep, newPlan(), out) if err != nil { t.Fatal(err) } @@ -105,7 +106,7 @@ func TestAssembleExecutorStream_WrapperSelection(t *testing.T) { inner: stream, cand: thinkerCand, }, pendingSelectionEffects{}) - got, err := ex.assembleExecutorStream(context.Background(), localPrep, plan, hiddenOut) + got, err := ex.assembleExecutorStream(context.Background(), localPrep, newPlan(), hiddenOut) if err != nil { t.Fatal(err) } @@ -125,7 +126,7 @@ func TestAssembleExecutorStream_WrapperSelection(t *testing.T) { inner: stream, cand: thinkerCand, }, pendingSelectionEffects{}) - got, err := ex.assembleExecutorStream(context.Background(), localPrep, plan, visibleOut) + got, err := ex.assembleExecutorStream(context.Background(), localPrep, newPlan(), visibleOut) if err != nil { t.Fatal(err) }