Repository: hadoop Updated Branches: refs/heads/branch-3.0 e5ef506dc -> 01e924a2c
YARN-6385. Fix checkstyle warnings in TestFileSystemApplicationHistoryStore Signed-off-by: Akira Ajisaka <aajis...@apache.org> (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/01e924a2 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/01e924a2 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/01e924a2 Branch: refs/heads/branch-3.0 Commit: 01e924a2ce0c396c931663516afa4042ac4259d5 Parents: e5ef506 Author: Yiqun Lin <yiqun01....@vipshop.com> Authored: Wed May 2 18:14:02 2018 +0900 Committer: Akira Ajisaka <aajis...@apache.org> Committed: Wed May 2 18:16:09 2018 +0900 ---------------------------------------------------------------------- .../TestFileSystemApplicationHistoryStore.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/01e924a2/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-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org