Skip to content

Commit

Permalink
fix: unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
youzhixiaomutou committed Sep 4, 2024
1 parent cdaa41e commit 3873d98
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion contrib/registry/nacos/v2/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,11 @@ func TestRegistry_Watch(t *testing.T) {
t.Errorf("Watch error = %v, wantErr %v", err, tt.wantErr)
return
}
if !reflect.DeepEqual(want[0], tt.want) {
// truncate for parallel test
if len(want) > 0 {
want = want[:1]
}
if !reflect.DeepEqual(want, tt.want) {
t.Errorf("Watch watcher = %v,got %v, want %v", watch, want, tt.want)
}
})
Expand Down

0 comments on commit 3873d98

Please sign in to comment.