mirror of
https://github.com/go-kratos/kratos.git
synced 2025-02-21 19:19:32 +02:00
test(options): increase tests coverage (#2183)
Co-authored-by: aythen <634222210@qq.com>
This commit is contained in:
parent
b3eff576ce
commit
afd108cdc7
@ -143,3 +143,12 @@ func TestRegistrarTimeout(t *testing.T) {
|
||||
t.Fatal("o.registrarTimeout is not equal to v")
|
||||
}
|
||||
}
|
||||
|
||||
func TestStopTimeout(t *testing.T) {
|
||||
o := &options{}
|
||||
v := time.Duration(123)
|
||||
StopTimeout(v)(o)
|
||||
if !reflect.DeepEqual(v, o.stopTimeout) {
|
||||
t.Fatal("o.stopTimeout is not equal to v")
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user