You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by sr...@apache.org on 2018/11/08 10:06:47 UTC
[flink] branch release-1.7 updated: [FLINK-10765][test] Include s3p
schema in S3 test
This is an automated email from the ASF dual-hosted git repository.
srichter pushed a commit to branch release-1.7
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.7 by this push:
new ca66bed [FLINK-10765][test] Include s3p schema in S3 test
ca66bed is described below
commit ca66bed090041e8a8c8bae2b7626a73ddf0ac6e0
Author: Stefan Richter <s....@data-artisans.com>
AuthorDate: Tue Nov 6 10:28:04 2018 +0100
[FLINK-10765][test] Include s3p schema in S3 test
This closes #7032.
---
.../flink/fs/s3presto/PrestoS3FileSystemITCase.java | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/flink-filesystems/flink-s3-fs-presto/src/test/java/org/apache/flink/fs/s3presto/PrestoS3FileSystemITCase.java b/flink-filesystems/flink-s3-fs-presto/src/test/java/org/apache/flink/fs/s3presto/PrestoS3FileSystemITCase.java
index 0783574..cc5c993 100644
--- a/flink-filesystems/flink-s3-fs-presto/src/test/java/org/apache/flink/fs/s3presto/PrestoS3FileSystemITCase.java
+++ b/flink-filesystems/flink-s3-fs-presto/src/test/java/org/apache/flink/fs/s3presto/PrestoS3FileSystemITCase.java
@@ -30,12 +30,16 @@ import org.apache.flink.util.TestLogger;
import org.junit.Assume;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
+import java.util.List;
import java.util.UUID;
import static com.facebook.presto.hive.PrestoS3FileSystem.S3_USE_INSTANCE_CREDENTIALS;
@@ -53,8 +57,17 @@ import static org.junit.Assert.fail;
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/Introduction.html#ConsistencyModel">consistency guarantees</a>
* and what the {@link com.facebook.presto.hive.PrestoS3FileSystem} offers.
*/
+@RunWith(Parameterized.class)
public class PrestoS3FileSystemITCase extends TestLogger {
+ @Parameterized.Parameter
+ public String scheme;
+
+ @Parameterized.Parameters(name = "Scheme = {0}")
+ public static List<String> parameters() {
+ return Arrays.asList("s3", "s3p");
+ }
+
private static final String BUCKET = System.getenv("ARTIFACTS_AWS_BUCKET");
private static final String TEST_DATA_DIR = "tests-" + UUID.randomUUID();
@@ -71,7 +84,7 @@ public class PrestoS3FileSystemITCase extends TestLogger {
@Test
public void testConfigKeysForwarding() throws Exception {
- final Path path = new Path("s3://" + BUCKET + '/' + TEST_DATA_DIR);
+ final Path path = new Path(scheme + "://" + BUCKET + '/' + TEST_DATA_DIR);
// access without credentials should fail
{
@@ -145,7 +158,7 @@ public class PrestoS3FileSystemITCase extends TestLogger {
FileSystem.initialize(conf);
- final Path path = new Path("s3://" + BUCKET + '/' + TEST_DATA_DIR + "/test.txt");
+ final Path path = new Path(scheme + "://" + BUCKET + '/' + TEST_DATA_DIR + "/test.txt");
final FileSystem fs = path.getFileSystem();
try {
@@ -178,7 +191,7 @@ public class PrestoS3FileSystemITCase extends TestLogger {
FileSystem.initialize(conf);
- final Path directory = new Path("s3://" + BUCKET + '/' + TEST_DATA_DIR + "/testdir/");
+ final Path directory = new Path(scheme + "://" + BUCKET + '/' + TEST_DATA_DIR + "/testdir/");
final FileSystem fs = directory.getFileSystem();
// directory must not yet exist