Skip to content

Commit

Permalink
NO-SNOW Fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-lsembera committed Jul 9, 2024
1 parent 9254771 commit 7533d01
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,16 @@ private void ingestRandomRowsToTable(
boolean isNullable)
throws ExecutionException, InterruptedException {

List<Map<String, Object>> rows = new ArrayList<>();
final List<Map<String, Object>> rows = Collections.synchronizedList(new ArrayList<>());
for (int i = 0; i < batchSize; i++) {
Random r = new Random();
rows.add(TestUtils.getRandomRow(r, isNullable));
}

ExecutorService testThreadPool = Executors.newFixedThreadPool(numChannels);
CompletableFuture[] futures = new CompletableFuture[numChannels];
List<SnowflakeStreamingIngestChannel> channelList = new ArrayList<>();
List<SnowflakeStreamingIngestChannel> channelList =
Collections.synchronizedList(new ArrayList<>());
for (int i = 0; i < numChannels; i++) {
final String channelName = "CHANNEL" + i;
int finalI = i;
Expand Down

0 comments on commit 7533d01

Please sign in to comment.