Skip to content

Flaky: ActivityTimeoutTest redelivery test reads the per-minute dispatch window on the real clock #932

Closed

Description

@rmcdaniel

Tests\Feature\ActivityTimeoutTest::test_activity_redelivery_preserves_deadlines_without_new_attempt_or_dispatch reads the per-minute dispatch window (admission.activity_tasks.server_dispatch_count_this_minute) on the real clock. Its neighbours pin the clock with Carbon::setTestNow; this test does not. If the dispatch and the queue read fall in different wall-clock minutes, the count reads 0 and the test fails:

1) Tests\Feature\ActivityTimeoutTest::test_activity_redelivery_preserves_deadlines_without_new_attempt_or_dispatch
Failed asserting that 0 is identical to 1.
tests/Feature/ActivityTimeoutTest.php:503

Seen on #925 (run 41364820332, job 125022705099, head 6dd357f). That PR changes no PHP app, test or config file. Fix: pin Carbon::setTestNow early in the minute for the test's duration, as the neighbouring tests do, and reset it afterwards.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions