Skip to content

TestAdaptiveImmediatePromote_Epoll fails when one /ping run takes over 2 ms, which -race plus coverage on a hosted runner can cause #752

Description

@FumingPower3925

Summary

TestAdaptiveImmediatePromote_Epoll (async_promote_integration_linux_test.go:73) fails on a timing it does not control.

  • The test asserts that the fast route /ping is never promoted. It sends /ping in a readiness loop and then once more.
  • A route is promoted after a single inline run longer than adaptiveBlockingThreshold (2 ms) (handler.go:186).
  • Under -race plus -covermode=atomic on a 4-vCPU GitHub runner, one /ping run can take longer than 2 ms. The route is then promoted, and the test fails with /ping (fast) must not be promoted.

Observed

--- FAIL: TestAdaptiveImmediatePromote_Epoll (0.01s)
    async_promote_integration_linux_test.go:73: /ping (fast) must not be promoted

Why it is the test

The test's own premise is that one run over 2 ms promotes a route. It then requires a real handler to stay under 2 ms on every run, on a shared runner, under the race detector and coverage instrumentation.

The coverage job is informational, so this does not block merges. It will still read as a red Coverage check on unrelated pull requests.

Direction

The assertion has to hold whatever the runner's scheduling. Two options:

The #622 lesson applies: an absolute latency bar on a hosted runner measures the runner.

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

    area/testTesting infrastructurebugSomething isn't working

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions