1
0
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:
jakezhu9 2022-07-10 20:44:33 +08:00 committed by GitHub
parent b3eff576ce
commit afd108cdc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")
}
}