You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/11/08 10:07:38 UTC

[GitHub] asfgit closed pull request #7032: [FLINK-10765][test] Include s3p schema in S3 test

asfgit closed pull request #7032: [FLINK-10765][test] Include s3p schema in S3 test
URL: https://github.com/apache/flink/pull/7032
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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 07835740e2d..cc5c9935202 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.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 @@
  * <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 static void checkIfCredentialsArePresent() {
 
 	@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 void testSimpleFileWriteAndRead() throws Exception {
 
 		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 void testDirectoryListing() throws Exception {
 
 		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


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services