Skip to content

test(cache): TestRedis_ProbeFitsASlowReconnect flakes on its first lookup on CI #728

Description

@EricAndrechek

Problem. TestRedis_ProbeFitsASlowReconnect (internal/cache/redis_integration_test.go) fails intermittently on GitHub runners, before it reaches the behaviour it tests. The failure is the test's FIRST lookup (line 974), which runs before any proxy delay is injected:

Error:  Received unexpected error:
        cache: redis lookup: context deadline exceeded
Test:   TestRedis_ProbeFitsASlowReconnect

Evidence (measured).

Context.

  • The test opens the cache with Timeout 100 ms, through a TLS proxy (selfSigned, newProxy). Its first Lookup has to dial and complete the TLS handshake within that per-operation timeout, the behaviour bug(cache): Redis recovery probe must fit a fresh dial in the op timeout #664 describes for rueidis.
  • The integration job runs this package in parallel with others that start containers (t.Parallel(), several packages per go test). So a loaded runner can push the first handshake past 100 ms. This is inferred; the handshake time on the runner has not been measured.

Related: #664.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions