flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From NicoK <...@git.apache.org>
Subject [GitHub] flink pull request #4939: [FLINK-4228][yarn/s3a] fix yarn resource upload s3...
Date Fri, 03 Nov 2017 11:11:10 GMT
Github user NicoK commented on a diff in the pull request:

    --- 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();
    -	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!


View raw message