Skip to content

Commit

Permalink
testing(bigquery/storage/managedwriter): fix go-cmp diff usage (#11459)
Browse files Browse the repository at this point in the history
This switches usage of sync.Mutex in options testing from allowing
unexported to ignoring outright.  There's chances to sync in the latest
versions of go head that aren't compatible with AllowUnexported, and
the comparison isn't relevant to the code under test.
  • Loading branch information
shollyman authored Jan 16, 2025
1 parent e33ceb4 commit d7ee725
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bigquery/storage/managedwriter/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ func TestWriterOptions(t *testing.T) {

if diff := cmp.Diff(got, tc.want,
cmp.AllowUnexported(ManagedStream{}, streamSettings{}),
cmp.AllowUnexported(sync.Mutex{}),
cmpopts.IgnoreTypes(sync.Mutex{}),
cmp.AllowUnexported(versionedTemplate{}),
cmpopts.IgnoreFields(versionedTemplate{}, "versionTime", "hashVal"),
protocmp.Transform(), // versionedTemplate embeds proto messages.
Expand Down

0 comments on commit d7ee725

Please sign in to comment.