Skip to content

Commit 5c931ef

Browse files
Queue::fake the last waitFor-racing parent/child summary test
Same bucket A pattern as the rest of the V2WorkflowTest waitFor cluster: testWorkflowSummaryProjectsChildWaitAndHealthyRepairNoOp relied on the testbench queue worker to drain the parent's start workflow task and the child's start workflow task before the test could assert on the parent's summary.wait_kind == 'child'. Under CI load this lost the race. Converting to Queue::fake + drainReadyTasks lets the test deterministically drive both runs through their first workflow task. drainReadyTasks already respects available_at (d042ea9) so the child's 60s timer task is left parked, leaving the parent in waiting_for_child as the test expects. Clears the last non-skip MySQL CI failure under #399. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 50028c9 commit 5c931ef

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests/Feature/V2/V2WorkflowTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2917,12 +2917,15 @@ public function testWorkflowCanWaitForChildWorkflowAndCompleteWithChildOutput():
29172917

29182918
public function testWorkflowSummaryProjectsChildWaitAndHealthyRepairNoOp(): void
29192919
{
2920+
Queue::fake();
2921+
29202922
$workflow = WorkflowStub::make(TestParentWaitingOnChildWorkflow::class, 'parent-child-waiting');
29212923
$workflow->start(60);
29222924
$parentRunId = $workflow->runId();
29232925

29242926
$this->assertNotNull($parentRunId);
29252927

2928+
$this->drainReadyTasks();
29262929
$this->waitFor(static fn (): bool => $workflow->refresh()->summary()?->wait_kind === 'child');
29272930

29282931
/** @var WorkflowLink $link */

0 commit comments

Comments
 (0)