From d42944646edc5c5c88d27ad25225ca4609df2350 Mon Sep 17 00:00:00 2001 From: shollyman Date: Tue, 22 Jun 2021 06:48:05 -0700 Subject: [PATCH] test(bigquery): address flaky error probing test (#4280) Context: Looks like error mapping for excessively sized requests is getting remapped to a more appropriate error code. Change expectations so we allow either HTTP 400 or 413 errors. Fixes: #4277 Fixes: #4279 Fixes: #4285 --- bigquery/integration_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bigquery/integration_test.go b/bigquery/integration_test.go index f9b160911f95..4273e84ec015 100644 --- a/bigquery/integration_test.go +++ b/bigquery/integration_test.go @@ -1249,8 +1249,8 @@ func TestIntegration_InsertErrors(t *testing.T) { if !ok { t.Errorf("wanted googleapi.Error, got: %v", err) } - if e.Code != http.StatusBadRequest { - t.Errorf("Wanted HTTP 400, got %d", e.Code) + if e.Code != http.StatusBadRequest && e.Code != http.StatusRequestEntityTooLarge { + t.Errorf("Wanted HTTP 400 or 413, got %d", e.Code) } }