Skip to content

Commit 12f3042

Browse files
shollymantbpg
andauthored
fix(bigquery): update streaming insert error test (#4321)
More backend changes appear to be inducing two forms of error message, depending on which component intercepts the error first. This test captures both outcomes (we always get an error). Co-authored-by: Tyler Bui-Palsulich <26876514+tbpg@users.noreply.github.com>
1 parent ae34396 commit 12f3042

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: bigquery/integration_test.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -1378,9 +1378,11 @@ func TestIntegration_InsertErrors(t *testing.T) {
13781378
if !ok {
13791379
t.Errorf("Wanted googleapi.Error, got: %v", err)
13801380
}
1381-
want := "Request payload size exceeds the limit"
1382-
if !strings.Contains(e.Message, want) {
1383-
t.Errorf("Error didn't contain expected message (%s): %s", want, e.Message)
1381+
if e.Code != http.StatusRequestEntityTooLarge {
1382+
want := "Request payload size exceeds the limit"
1383+
if !strings.Contains(e.Message, want) {
1384+
t.Errorf("Error didn't contain expected message (%s): %#v", want, e)
1385+
}
13841386
}
13851387
// Case 2: Very Large Request
13861388
// Request so large it gets rejected by intermediate infra (3x 10MB rows)

0 commit comments

Comments
 (0)