From common-commits-return-82179-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Wed May 2 11:15:59 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id EC6C418065D for ; Wed, 2 May 2018 11:15:58 +0200 (CEST) Received: (qmail 58393 invoked by uid 500); 2 May 2018 09:15:57 -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 58383 invoked by uid 99); 2 May 2018 09:15:57 -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, 02 May 2018 09:15:57 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A7FCEE061B; Wed, 2 May 2018 09:15:57 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aajisaka@apache.org To: common-commits@hadoop.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: hadoop git commit: YARN-6385. Fix checkstyle warnings in TestFileSystemApplicationHistoryStore Date: Wed, 2 May 2018 09:15:57 +0000 (UTC) Repository: hadoop Updated Branches: refs/heads/branch-3.1 cacd267b0 -> 2741af505 YARN-6385. Fix checkstyle warnings in TestFileSystemApplicationHistoryStore Signed-off-by: Akira Ajisaka (cherry picked from commit 3265b55119d39ecbda6d75be04a9a1bf59c631f1) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/2741af50 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/2741af50 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/2741af50 Branch: refs/heads/branch-3.1 Commit: 2741af505f5d267e20646f33f31680b9a8a1de15 Parents: cacd267 Author: Yiqun Lin Authored: Wed May 2 18:14:02 2018 +0900 Committer: Akira Ajisaka Committed: Wed May 2 18:15:53 2018 +0900 ---------------------------------------------------------------------- .../TestFileSystemApplicationHistoryStore.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/2741af50/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestFileSystemApplicationHistoryStore.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestFileSystemApplicationHistoryStore.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestFileSystemApplicationHistoryStore.java index df4adbe..6b068c1 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestFileSystemApplicationHistoryStore.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestFileSystemApplicationHistoryStore.java @@ -272,20 +272,20 @@ public class TestFileSystemApplicationHistoryStore extends tearDown(); // Setup file system to inject startup conditions - FileSystem fs = spy(new RawLocalFileSystem()); + FileSystem fileSystem = spy(new RawLocalFileSystem()); FileStatus fileStatus = Mockito.mock(FileStatus.class); doReturn(true).when(fileStatus).isDirectory(); - doReturn(fileStatus).when(fs).getFileStatus(any(Path.class)); + doReturn(fileStatus).when(fileSystem).getFileStatus(any(Path.class)); try { - initAndStartStore(fs); + initAndStartStore(fileSystem); } catch (Exception e) { Assert.fail("Exception should not be thrown: " + e); } // Make sure that directory creation was not attempted verify(fileStatus, never()).isDirectory(); - verify(fs, times(1)).mkdirs(any(Path.class)); + verify(fileSystem, times(1)).mkdirs(any(Path.class)); } @Test @@ -294,14 +294,14 @@ public class TestFileSystemApplicationHistoryStore extends tearDown(); // Setup file system to inject startup conditions - FileSystem fs = spy(new RawLocalFileSystem()); + FileSystem fileSystem = spy(new RawLocalFileSystem()); FileStatus fileStatus = Mockito.mock(FileStatus.class); doReturn(false).when(fileStatus).isDirectory(); - doReturn(fileStatus).when(fs).getFileStatus(any(Path.class)); - doThrow(new IOException()).when(fs).mkdirs(any(Path.class)); + doReturn(fileStatus).when(fileSystem).getFileStatus(any(Path.class)); + doThrow(new IOException()).when(fileSystem).mkdirs(any(Path.class)); try { - initAndStartStore(fs); + initAndStartStore(fileSystem); Assert.fail("Exception should have been thrown"); } catch (Exception e) { // Expected failure @@ -309,6 +309,6 @@ public class TestFileSystemApplicationHistoryStore extends // Make sure that directory creation was attempted verify(fileStatus, never()).isDirectory(); - verify(fs, times(1)).mkdirs(any(Path.class)); + verify(fileSystem, times(1)).mkdirs(any(Path.class)); } } --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-commits-help@hadoop.apache.org