diff --git a/src/test/java/net/snowflake/ingest/streaming/internal/StreamingIngestBigFilesIT.java b/src/test/java/net/snowflake/ingest/streaming/internal/StreamingIngestBigFilesIT.java index ead26acd6..b7f9e6829 100644 --- a/src/test/java/net/snowflake/ingest/streaming/internal/StreamingIngestBigFilesIT.java +++ b/src/test/java/net/snowflake/ingest/streaming/internal/StreamingIngestBigFilesIT.java @@ -130,7 +130,7 @@ private void ingestRandomRowsToTable( boolean isNullable) throws ExecutionException, InterruptedException { - List> rows = new ArrayList<>(); + final List> rows = Collections.synchronizedList(new ArrayList<>()); for (int i = 0; i < batchSize; i++) { Random r = new Random(); rows.add(TestUtils.getRandomRow(r, isNullable)); @@ -138,7 +138,8 @@ private void ingestRandomRowsToTable( ExecutorService testThreadPool = Executors.newFixedThreadPool(numChannels); CompletableFuture[] futures = new CompletableFuture[numChannels]; - List channelList = new ArrayList<>(); + List channelList = + Collections.synchronizedList(new ArrayList<>()); for (int i = 0; i < numChannels; i++) { final String channelName = "CHANNEL" + i; int finalI = i;