Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 415CD200CBD for ; Thu, 22 Jun 2017 01:24:03 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3FEFF160BF6; Wed, 21 Jun 2017 23:24:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 85827160BD5 for ; Thu, 22 Jun 2017 01:24:02 +0200 (CEST) Received: (qmail 36299 invoked by uid 500); 21 Jun 2017 23:23:54 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 36015 invoked by uid 99); 21 Jun 2017 23:23:53 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jun 2017 23:23:53 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D92FAE9638; Wed, 21 Jun 2017 23:23:48 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: inigoiri@apache.org To: common-commits@hadoop.apache.org Date: Wed, 21 Jun 2017 23:23:56 -0000 Message-Id: <73e192d1233d4489a8c7625ce9dff3db@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [09/50] [abbrv] hadoop git commit: HADOOP-14494. ITestJets3tNativeS3FileSystemContract tests NPEs in teardown if store undefined. Contributed by Steve Loughran archived-at: Wed, 21 Jun 2017 23:24:03 -0000 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 Authored: Thu Jun 15 11:16:16 2017 -0700 Committer: Mingliang Liu 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