Github user StephanEwen commented on a diff in the pull request: https://github.com/apache/flink/pull/4939#discussion_r148656918 --- 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 -- I would suggest to move this out of the "setup" method into the actual test. The setup logic is not shared (all other test methods don't assume that setup) and it also assumes existence of functionality that is tested in other test methods..
---