hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From inigo...@apache.org
Subject [09/50] [abbrv] hadoop git commit: HADOOP-14494. ITestJets3tNativeS3FileSystemContract tests NPEs in teardown if store undefined. Contributed by Steve Loughran
Date Wed, 21 Jun 2017 23:23:56 GMT
HADOOP-14494. ITestJets3tNativeS3FileSystemContract tests NPEs in teardown if store undefined.
Contributed by Steve Loughran


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/f214a996
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/f214a996
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/f214a996

Branch: refs/heads/HDFS-10467
Commit: f214a9961fdeeebc6157992ed54a777983e218e9
Parents: 3f51087
Author: Mingliang Liu <liuml07@apache.org>
Authored: Thu Jun 15 11:16:16 2017 -0700
Committer: Mingliang Liu <liuml07@apache.org>
Committed: Thu Jun 15 11:16:16 2017 -0700

----------------------------------------------------------------------
 .../fs/s3native/NativeS3FileSystemContractBaseTest.java      | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/f214a996/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/NativeS3FileSystemContractBaseTest.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/NativeS3FileSystemContractBaseTest.java
b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/NativeS3FileSystemContractBaseTest.java
index a6dc2d3..bfbca71 100644
--- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/NativeS3FileSystemContractBaseTest.java
+++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/NativeS3FileSystemContractBaseTest.java
@@ -44,19 +44,21 @@ public abstract class NativeS3FileSystemContractBaseTest
   @Before
   public void setUp() throws Exception {
     Configuration conf = new Configuration();
-    store = getNativeFileSystemStore();
-    fs = new NativeS3FileSystem(store);
     String fsname = conf.get(KEY_TEST_FS);
     if (StringUtils.isEmpty(fsname)) {
       throw new AssumptionViolatedException(
           "No test FS defined in :" + KEY_TEST_FS);
     }
+    store = getNativeFileSystemStore();
+    fs = new NativeS3FileSystem(store);
     fs.initialize(URI.create(fsname), conf);
   }
   
   @After
   public void tearDown() throws Exception {
-    store.purge("test");
+    if (store != null) {
+      store.purge("test");
+    }
   }
 
   @Test


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message