mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
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>
This commit is contained in:
parent
590c693b96
commit
a64593d7ef
@ -15,6 +15,7 @@
|
||||
|
||||
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…
Reference in New Issue
Block a user