mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-14 15:07:55 +00:00
net/portmapper: fix test flakes from logging after test done
Fixes #15794 Change-Id: Ic22aa99acb10fdb6dc5f0b6482e722e48237703c Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
66371f392a
commit
189e03e741
@@ -13,6 +13,7 @@ import (
|
||||
|
||||
"go4.org/mem"
|
||||
"tailscale.com/types/logger"
|
||||
"tailscale.com/util/testenv"
|
||||
)
|
||||
|
||||
type testLogWriter struct {
|
||||
@@ -149,7 +150,7 @@ func (ml *MemLogger) String() string {
|
||||
|
||||
// WhileTestRunningLogger returns a logger.Logf that logs to t.Logf until the
|
||||
// test finishes, at which point it no longer logs anything.
|
||||
func WhileTestRunningLogger(t testing.TB) logger.Logf {
|
||||
func WhileTestRunningLogger(t testenv.TB) logger.Logf {
|
||||
var (
|
||||
mu sync.RWMutex
|
||||
done bool
|
||||
|
Reference in New Issue
Block a user