From 853e124c35c33f8fd8660e01c5779a25f14ae662 Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Wed, 10 Jun 2026 13:28:36 -0400 Subject: [PATCH] fix(bigquery): fix flaky testInsertAll by adding insert IDs --- .../google/cloud/bigquery/it/ITBigQueryTest.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/java-bigquery/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java b/java-bigquery/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java index 3cc3c47acc54..dd7319af2e4c 100644 --- a/java-bigquery/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java +++ b/java-bigquery/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java @@ -2983,8 +2983,8 @@ void testInsertAll() throws IOException { builder2.put("NumericField", new BigDecimal("123456789.123456789")); InsertAllRequest request = InsertAllRequest.newBuilder(tableInfo.getTableId()) - .addRow(builder1.build()) - .addRow(builder2.build()) + .addRow(UUID.randomUUID().toString(), builder1.build()) + .addRow(UUID.randomUUID().toString(), builder2.build()) .build(); InsertAllResponse response = bigquery.insertAll(request); assertFalse(response.hasErrors()); @@ -3042,8 +3042,8 @@ void testInsertAllWithSuffix() throws InterruptedException { builder2.put("NumericField", new BigDecimal("123456789.123456789")); InsertAllRequest request = InsertAllRequest.newBuilder(tableInfo.getTableId()) - .addRow(builder1.build()) - .addRow(builder2.build()) + .addRow(UUID.randomUUID().toString(), builder1.build()) + .addRow(UUID.randomUUID().toString(), builder2.build()) .setTemplateSuffix("_suffix") .build(); InsertAllResponse response = bigquery.insertAll(request); @@ -3116,9 +3116,9 @@ void testInsertAllWithErrors() { builder3.put("BytesField", BYTES_BASE64); InsertAllRequest request = InsertAllRequest.newBuilder(tableInfo.getTableId()) - .addRow(builder1.build()) - .addRow(builder2.build()) - .addRow(builder3.build()) + .addRow(UUID.randomUUID().toString(), builder1.build()) + .addRow(UUID.randomUUID().toString(), builder2.build()) + .addRow(UUID.randomUUID().toString(), builder3.build()) .setSkipInvalidRows(true) .build(); InsertAllResponse response = bigquery.insertAll(request);