Skip to content

test: TestLoginRememberedTimer sometimes fails: a value the store gave out is not cleared #210

Open

Description

@groupsky

What happened

On 2026-11-17, the CI job test (stable) of #209 failed once in a test that #209 does not touch:

--- FAIL: TestLoginRememberedTimer/the_broker's_timer
    remembered_test.go:614: value 2 that the store gave out is not cleared
    remembered_test.go:614: value 3 that the store gave out is not cleared
FAIL	github.com/code6x/nodkey/internal/broker

A rerun of the job passed. 20 local runs (go test -race -count=20 -run TestLoginRememberedTimer ./internal/broker/) pass. So it is a rare flake, maybe one that shows only under load: since #209, the contract tests run in the same go test -race ./... job.

The check is about clearing values from memory, so the test needs a look: either the test waits too little, or the broker sometimes clears a value late.

Done when

  • The cause is known: a test timing problem, or a value that the broker clears late.
  • Fixed, and go test -race -count=200 -run TestLoginRememberedTimer ./internal/broker/ passes, also with the CPU busy (for example with -cpu 1,2).

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