Skip to content

Commit

Permalink
Reduce repetitions of testCreateFileRetry
Browse files Browse the repository at this point in the history
  • Loading branch information
elonazoulay authored and wendigo committed Dec 17, 2023
1 parent 5fb1050 commit 5912370
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 5912370

Please sign in to comment.