mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-14 02:10:00 +08:00
chore: add more tests (#4656)
This commit is contained in:
@@ -241,6 +241,16 @@ func Test_isSlow(t *testing.T) {
|
|||||||
true,
|
true,
|
||||||
nil,
|
nil,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"dynamic",
|
||||||
|
args{
|
||||||
|
duration: time.Millisecond * 200,
|
||||||
|
},
|
||||||
|
true,
|
||||||
|
func() {
|
||||||
|
SetSlowThreshold(time.Millisecond * 100)
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
|||||||
Reference in New Issue
Block a user