Files
magpie/internal/gui/race_off_test.go
T
yetone fa4704f060 gui: a test bounding allocations skips its bound under -race
Under -race sync.Pool lets a quarter of what is put in it go, so json's
encoders and regexp's matchers are made again: four gui tests bounding
what a path allocates went red under -race at fd70def82, and at the
base before it. TestProviderInfoReadsTheListOnce measured a row at 88
MB against 13 MB without -race, all in catalog.FamilyOf's regexps.
raceOn (as internal/gateway has it) now skips the bound in
TestStateWriteGrowsNoBufferItsSize, TestProvidersWriteGrowsNoBufferItsSize,
TestJSONRowsNotHeldWhole and TestProviderInfoReadsTheListOnce (after its
row checks). Without -race they run as before.

Run on mote at this tree:
- gofmt, go vet ./internal/gui, GOOS=windows and GOOS=linux go vet
  -tags nogui: ok.
- The four tests without -race: PASS.
- go test -race ./internal/gui: only TestSettingsSaveKeepsWhatItDoesNotSend
  (#4514) and TestMainWindowCorners (#3949) red, which are red without
  -race too.

Picked onto 7da5b34aa (sessions, gateway); not run again there.
2026-11-01 09:14:11 +08:00

6 lines
52 B
Go

//go:build !race
package gui
const raceOn = false