refactor: simplify zrpc stat config (#3107)

This commit is contained in:
Kevin Wan
2023-04-08 22:45:05 +08:00
committed by GitHub
parent e13fd62d38
commit 98c9b5928a
6 changed files with 36 additions and 35 deletions

View File

@@ -135,9 +135,9 @@ func TestLogDurationWithoutContent(t *testing.T) {
}
DontLogContentForMethod("foo")
// reset notLoggingContentMethods
// reset ignoreContentMethods
t.Cleanup(func() {
notLoggingContentMethods = sync.Map{}
ignoreContentMethods = sync.Map{}
})
for _, test := range tests {
test := test
@@ -198,9 +198,9 @@ func Test_shouldLogContent(t *testing.T) {
if tt.setup != nil {
tt.setup()
}
// reset notLoggingContentMethods
// reset ignoreContentMethods
t.Cleanup(func() {
notLoggingContentMethods = sync.Map{}
ignoreContentMethods = sync.Map{}
})
set := collection.NewSet()
set.AddStr(tt.args.staticNotLoggingContentMethods...)