Skip to content

Commit

Permalink
fix(bigquery): update streaming insert error test (#4321)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
shollyman and tbpg committed Jun 28, 2021
1 parent ae34396 commit 12f3042
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bigquery/integration_test.go
Expand Up @@ -1378,9 +1378,11 @@ func TestIntegration_InsertErrors(t *testing.T) {
if !ok {
t.Errorf("Wanted googleapi.Error, got: %v", err)
}
want := "Request payload size exceeds the limit"
if !strings.Contains(e.Message, want) {
t.Errorf("Error didn't contain expected message (%s): %s", want, e.Message)
if e.Code != http.StatusRequestEntityTooLarge {
want := "Request payload size exceeds the limit"
if !strings.Contains(e.Message, want) {
t.Errorf("Error didn't contain expected message (%s): %#v", want, e)
}
}
// Case 2: Very Large Request
// Request so large it gets rejected by intermediate infra (3x 10MB rows)
Expand Down

0 comments on commit 12f3042

Please sign in to comment.