diff --git a/lib/trino-filesystem-gcs/src/test/java/io/trino/filesystem/gcs/TestGcsFileSystemGcs.java b/lib/trino-filesystem-gcs/src/test/java/io/trino/filesystem/gcs/TestGcsFileSystemGcs.java index 852b30da274b..00f08df91377 100644 --- a/lib/trino-filesystem-gcs/src/test/java/io/trino/filesystem/gcs/TestGcsFileSystemGcs.java +++ b/lib/trino-filesystem-gcs/src/test/java/io/trino/filesystem/gcs/TestGcsFileSystemGcs.java @@ -38,8 +38,12 @@ void setup() @Test void testCreateFileRetry() { + // Note: this test is meant to expose flakiness + // Without retries it may fail non-deterministically. + // Retries are enabled in the default GcsFileSystemConfig. + // In practice this may happen between 7 and 20 retries. assertThatNoException().isThrownBy(() -> { - for (int i = 1; i <= 100; i++) { + for (int i = 1; i <= 30; i++) { TrinoOutputFile outputFile = getFileSystem().newOutputFile(getRootLocation().appendPath("testFile")); try (OutputStream out = outputFile.createOrOverwrite()) { out.write("test".getBytes(UTF_8));