From afd108cdc766f73027d13d2df16bb16bbbfd4fbc Mon Sep 17 00:00:00 2001 From: jakezhu9 <107761771+jakezhu9@users.noreply.github.com> Date: Sun, 10 Jul 2022 20:44:33 +0800 Subject: [PATCH] test(options): increase tests coverage (#2183) Co-authored-by: aythen <634222210@qq.com> --- options_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/options_test.go b/options_test.go index 4880bd195..438de3d83 100644 --- a/options_test.go +++ b/options_test.go @@ -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") + } +}