Skip to content

Telegram: TestCoreExpiredTap is flaky #51

Closed

Description

@groupsky

Why

TestCoreExpiredTap in internal/telegram failed once in a full go test -race ./... run on 2026-10-15 ("0 reports, want 1"). It passed 300 of 300 runs alone and in every later full run.

The likely cause: poll.go answers the tap (answerCallbackQuery) before it reports the refused tap, and the test checks the reports right after it sees the answer, without waiting for the report. A flaky test in CI would block merges and teach people to re-run red builds.

Also flaky: TestCoreRedeliveredTapKeepsResult (attack_test.go:202: "waited 10s in vain for 1 calls of editMessageReplyMarkup"). It failed in CI on PR #52 (2026-10-15), and on main 03bb431 it failed 29 of 120 runs with go test -race -count=40 -cpu 1,2,4 -run TestCoreRedeliveredTapKeepsResult ./internal/telegram/.

What

  • The test waits for the report (with a deadline), or the code reports the tap before it answers it, whichever matches DESIGN.md section 7.
  • Look for the same pattern in the other TestCore* tests.

Done when

  • go test -race -count=200 -cpu 1,2,4 -run 'TestCore' ./internal/telegram/ passes.
  • No test in the package checks a report without waiting for it.

Activity

  1. added this to the v1 milestone on Oct 14, 2026
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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions