Skip to content

Commit

Permalink
Fix UT
Browse files Browse the repository at this point in the history
  • Loading branch information
zbud-msft committed Dec 19, 2024
1 parent dd006d6 commit f4c9ce9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gnmi_server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f4c9ce9

Please sign in to comment.