From d083ac00034dfaec4447b56d7dcd0be8e5cac5f4 Mon Sep 17 00:00:00 2001 From: Evan Greco Date: Wed, 8 Nov 2023 22:04:28 +0000 Subject: [PATCH] Directly add streamwriter to list in connection worker pool test --- .../cloud/bigquery/storage/v1/ConnectionWorkerPoolTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerPoolTest.java b/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerPoolTest.java index c13d1261f9..ccae51dcbd 100644 --- a/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerPoolTest.java +++ b/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerPoolTest.java @@ -389,7 +389,7 @@ public void testCloseExternalClient() // Create some stream writers. List streamWriterList = new ArrayList<>(); for (int i = 0; i < 4; i++) { - StreamWriter sw = + streamWriterList.add( StreamWriter.newBuilder( String.format("projects/p1/datasets/d1/tables/t%s/streams/_default", i), externalClient) @@ -397,8 +397,7 @@ public void testCloseExternalClient() .setWriterSchema(createProtoSchema()) .setTraceId(TEST_TRACE_ID) .setLocation("us") - .build(); - streamWriterList.add(sw); + .build()); } for (long i = 0; i < appendCount; i++) {