Github user NicoK commented on a diff in the pull request:
https://github.com/apache/flink/pull/4939#discussion_r148756295
--- Diff:
flink-filesystems/flink-s3-fs-hadoop/src/test/java/org/apache/flink/fs/s3hadoop/HadoopS3FileSystemITCase.java
---
@@ -57,11 +62,52 @@
private static final String ACCESS_KEY =
System.getenv("ARTIFACTS_AWS_ACCESS_KEY");
private static final String SECRET_KEY =
System.getenv("ARTIFACTS_AWS_SECRET_KEY");
+ @Rule
+ public TemporaryFolder tempFolder = new TemporaryFolder();
+
@BeforeClass
- public static void checkIfCredentialsArePresent() {
+ public static void checkCredentialsAndSetup() throws IOException {
+ // check whether credentials exist
Assume.assumeTrue("AWS S3 bucket not configured, skipping
test...", BUCKET != null);
Assume.assumeTrue("AWS S3 access key not configured, skipping
test...", ACCESS_KEY != null);
Assume.assumeTrue("AWS S3 secret key not configured, skipping
test...", SECRET_KEY != null);
+
+ // initialize configuration with valid credentials
--- End diff --
This is actually not for the new test, but for the cleanup: the current
state of the `HadoopS3FileSystemITCase` leaves this (random) test directory
behind. In order to delete this after the tests of the class finished, I
thought we should make sure that it did not exist before so that we are not
deleting something we shouldn't!
---