chore: add more tests (#3279)

This commit is contained in:
Kevin Wan
2023-05-24 23:58:45 +08:00
committed by GitHub
parent ef26b39b4c
commit 4a2a8d9e45
6 changed files with 158 additions and 89 deletions

View File

@@ -3,7 +3,6 @@
package stat
import (
"os"
"strconv"
"sync/atomic"
"testing"
@@ -12,8 +11,7 @@ import (
)
func TestReport(t *testing.T) {
os.Setenv(clusterNameKey, "test-cluster")
defer os.Unsetenv(clusterNameKey)
t.Setenv(clusterNameKey, "test-cluster")
var count int32
SetReporter(func(s string) {