-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Configure retries for trino-filesystem-gcs #20003
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,10 +13,16 @@ | |
| */ | ||
| package io.trino.filesystem.gcs; | ||
|
|
||
| import io.trino.filesystem.TrinoOutputFile; | ||
| import org.junit.jupiter.api.BeforeAll; | ||
| import org.junit.jupiter.api.Test; | ||
| import org.junit.jupiter.api.TestInstance; | ||
|
|
||
| import java.io.IOException; | ||
| import java.io.OutputStream; | ||
|
|
||
| import static java.nio.charset.StandardCharsets.UTF_8; | ||
| import static org.assertj.core.api.Assertions.assertThatNoException; | ||
|
|
||
| @TestInstance(TestInstance.Lifecycle.PER_CLASS) | ||
| public class TestGcsFileSystemGcs | ||
|
|
@@ -28,4 +34,16 @@ void setup() | |
| { | ||
| initialize(getRequiredEnvironmentVariable("GCP_CREDENTIALS_KEY")); | ||
| } | ||
|
|
||
| @Test | ||
| void testCreateFileRetry() | ||
electrum marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
electrum marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| { | ||
| assertThatNoException().isThrownBy(() -> { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm confused by the purpose of
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it captures intent nicely - for the case when you just want to check code runs fine and do not do any assertions. |
||
| for (int i = 1; i <= 100; i++) { | ||
| TrinoOutputFile outputFile = getFileSystem().newOutputFile(getRootLocation().appendPath("testFile")); | ||
| try (OutputStream out = outputFile.createOrOverwrite()) { | ||
| out.write("test".getBytes(UTF_8)); | ||
| } | ||
| }}); | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.