From f4c9ce9f91cfdb92637658469efea8621741d6dd Mon Sep 17 00:00:00 2001 From: Zain Budhwani Date: Thu, 19 Dec 2024 21:45:13 +0000 Subject: [PATCH] Fix UT --- gnmi_server/server_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gnmi_server/server_test.go b/gnmi_server/server_test.go index 43f6901c..ee59c630 100644 --- a/gnmi_server/server_test.go +++ b/gnmi_server/server_test.go @@ -282,13 +282,17 @@ func TestPFCWDErrors(t *testing.T) { }, } + ns, _ := sdcfg.GetDbDefaultNamespace() + prepareDb(t, ns) + var mutexGotNoti sync.Mutex + for _, tt := range tests { t.Run(tt.desc, func(t *testing.T) { q := tt.q q.Addrs = []string{"127.0.0.1:8081"} c := client.New() var gotNoti []client.Notification - var mutexGotNoti sync.Mutex + q.NotificationHandler = func(n client.Notification) error { mutexGotNoti.Lock() if nn, ok := n.(client.Update); ok {