types/logger: fix test failure I missed earlier

I didn't see the race builder fail on CI earlier in 590c693b9.
This fixes the test.

Updates #greenci

Change-Id: I9f271bfadfc29b010226b55bf6647f35f03730b1
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/9125/head
Brad Fitzpatrick 1 year ago committed by Brad Fitzpatrick
parent 590c693b96
commit a64593d7ef

@ -15,6 +15,7 @@ import (
qt "github.com/frankban/quicktest"
"tailscale.com/tailcfg"
"tailscale.com/version"
)
func TestFuncWriter(t *testing.T) {
@ -238,6 +239,12 @@ func TestAsJSON(t *testing.T) {
t.Errorf("for marshal error, got %#q; want %#q", got, wantErr)
}
if version.IsRace() {
// skip the rest of the test in race mode;
// race mode causes more allocs which we don't care about.
return
}
var buf bytes.Buffer
n := int(testing.AllocsPerRun(1000, func() {
buf.Reset()

Loading…
Cancel
Save