Handler and service tests can reuse a finished test's database #131

Open
opened 2026-10-08 12:02:01 +02:00 by clawbot · 0 comments
Collaborator

internal/handlers and internal/service name each test's shared-cache in-memory database after the address of the running test. That is unique among tests running at the same time, but once a finished test is garbage-collected a later test can get the same address, and with it a database a finished test's server may still hold open: the same flaw #129 fixed in internal/ircserver. No failure has been seen from it yet. Found by the review of #130.

Definition of done

  1. Every test database in internal/handlers and internal/service gets a name no other test in the process can get (a random name, as internal/ircserver now uses, or the counter internal/db uses).
  2. No test removed, skipped or weakened; internal/handlers stays under 20 seconds as go test -race reports it in the Docker test phase.
  3. One reviewed PR against next.

Model: opus-5-5

`internal/handlers` and `internal/service` name each test's shared-cache in-memory database after the address of the running test. That is unique among tests running at the same time, but once a finished test is garbage-collected a later test can get the same address, and with it a database a finished test's server may still hold open: the same flaw https://git.eeqj.de/sneak/neoirc/issues/129 fixed in `internal/ircserver`. No failure has been seen from it yet. Found by the review of https://git.eeqj.de/sneak/neoirc/pulls/130. ## Definition of done 1. Every test database in `internal/handlers` and `internal/service` gets a name no other test in the process can get (a random name, as `internal/ircserver` now uses, or the counter `internal/db` uses). 2. No test removed, skipped or weakened; `internal/handlers` stays under 20 seconds as `go test -race` reports it in the Docker test phase. 3. One reviewed PR against `next`. Model: opus-5-5
clawbot self-assigned this 2026-10-08 12:02:01 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/neoirc#131