This is an automated email from the ASF dual-hosted git repository. stevel pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push: new 9ca1052d00c YARN-11799. Remove PrintStream write counting from TestYarnCLI (#7518) 9ca1052d00c is described below commit 9ca1052d00ce6b5bf33e2c47abf3141d4399b825 Author: Istvan Toth <st...@apache.org> AuthorDate: Tue Mar 18 11:08:24 2025 +0100 YARN-11799. Remove PrintStream write counting from TestYarnCLI (#7518) Contributed by Istvan Toth --- .../org/apache/hadoop/yarn/client/cli/TestYarnCLI.java | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java index 08487595325..1848a921222 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java @@ -521,7 +521,6 @@ public void testGetApplications() throws Exception { pw.close(); String appsReportStr = baos.toString("UTF-8"); assertEquals(appsReportStr, sysOutStream.toString()); - verify(sysOut, times(1)).write(any(byte[].class), anyInt(), anyInt()); //Test command yarn application -list --appTypes apptype1,apptype2 //the output should be the same as @@ -562,7 +561,6 @@ public void testGetApplications() throws Exception { pw.close(); appsReportStr = baos.toString("UTF-8"); assertEquals(appsReportStr, sysOutStream.toString()); - verify(sysOut, times(2)).write(any(byte[].class), anyInt(), anyInt()); //Test command yarn application -list --appStates appState1,appState2 sysOutStream.reset(); @@ -603,7 +601,6 @@ public void testGetApplications() throws Exception { pw.close(); appsReportStr = baos.toString("UTF-8"); assertEquals(appsReportStr, sysOutStream.toString()); - verify(sysOut, times(3)).write(any(byte[].class), anyInt(), anyInt()); // Test command yarn application -list --appTypes apptype1,apptype2 // --appStates appstate1,appstate2 @@ -642,7 +639,6 @@ public void testGetApplications() throws Exception { pw.close(); appsReportStr = baos.toString("UTF-8"); assertEquals(appsReportStr, sysOutStream.toString()); - verify(sysOut, times(4)).write(any(byte[].class), anyInt(), anyInt()); //Test command yarn application -list --appStates with invalid appStates sysOutStream.reset(); @@ -664,7 +660,6 @@ public void testGetApplications() throws Exception { pw.close(); appsReportStr = baos.toString("UTF-8"); assertEquals(appsReportStr, sysOutStream.toString()); - verify(sysOut, times(4)).write(any(byte[].class), anyInt(), anyInt()); //Test command yarn application -list --appStates all sysOutStream.reset(); @@ -723,7 +718,6 @@ public void testGetApplications() throws Exception { pw.close(); appsReportStr = baos.toString("UTF-8"); assertEquals(appsReportStr, sysOutStream.toString()); - verify(sysOut, times(5)).write(any(byte[].class), anyInt(), anyInt()); // Test command yarn application user case insensitive sysOutStream.reset(); @@ -759,7 +753,6 @@ public void testGetApplications() throws Exception { pw.close(); appsReportStr = baos.toString("UTF-8"); assertEquals(appsReportStr, sysOutStream.toString()); - verify(sysOut, times(6)).write(any(byte[].class), anyInt(), anyInt()); // Test command yarn application with tags. sysOutStream.reset(); @@ -793,7 +786,6 @@ public void testGetApplications() throws Exception { pw.close(); appsReportStr = baos.toString("UTF-8"); assertEquals(appsReportStr, sysOutStream.toString()); - verify(sysOut, times(7)).write(any(byte[].class), anyInt(), anyInt()); sysOutStream.reset(); EnumSet<YarnApplicationState> appState7 = @@ -833,7 +825,6 @@ public void testGetApplications() throws Exception { pw.close(); appsReportStr = baos.toString("UTF-8"); assertEquals(appsReportStr, sysOutStream.toString()); - verify(sysOut, times(8)).write(any(byte[].class), anyInt(), anyInt()); sysOutStream.reset(); Set<String> appType9 = Sets.newHashSet("YARN"); @@ -862,7 +853,6 @@ public void testGetApplications() throws Exception { pw.close(); appsReportStr = baos.toString("UTF-8"); assertEquals(appsReportStr, sysOutStream.toString()); - verify(sysOut, times(9)).write(any(byte[].class), anyInt(), anyInt()); sysOutStream.reset(); Set<String> appType10 = Sets.newHashSet("HIVE"); @@ -893,7 +883,6 @@ public void testGetApplications() throws Exception { pw.close(); appsReportStr = baos.toString("UTF-8"); assertEquals(appsReportStr, sysOutStream.toString()); - verify(sysOut, times(10)).write(any(byte[].class), anyInt(), anyInt()); } private List<ApplicationReport> getApplicationReports( @@ -1398,7 +1387,6 @@ public void testListClusterNodes() throws Exception { pw.close(); nodesReportStr = baos.toString("UTF-8"); assertEquals(nodesReportStr, sysOutStream.toString()); - verify(sysOut, times(4)).write(any(byte[].class), anyInt(), anyInt()); sysOutStream.reset(); nodeStates.clear(); @@ -1419,7 +1407,6 @@ public void testListClusterNodes() throws Exception { pw.close(); nodesReportStr = baos.toString("UTF-8"); assertEquals(nodesReportStr, sysOutStream.toString()); - verify(sysOut, times(5)).write(any(byte[].class), anyInt(), anyInt()); sysOutStream.reset(); nodeStates.clear(); @@ -1440,7 +1427,6 @@ public void testListClusterNodes() throws Exception { pw.close(); nodesReportStr = baos.toString("UTF-8"); assertEquals(nodesReportStr, sysOutStream.toString()); - verify(sysOut, times(6)).write(any(byte[].class), anyInt(), anyInt()); sysOutStream.reset(); nodeStates.clear(); @@ -1461,7 +1447,6 @@ public void testListClusterNodes() throws Exception { pw.close(); nodesReportStr = baos.toString("UTF-8"); assertEquals(nodesReportStr, sysOutStream.toString()); - verify(sysOut, times(7)).write(any(byte[].class), anyInt(), anyInt()); sysOutStream.reset(); nodeStates.clear(); @@ -1482,7 +1467,6 @@ public void testListClusterNodes() throws Exception { pw.close(); nodesReportStr = baos.toString("UTF-8"); assertEquals(nodesReportStr, sysOutStream.toString()); - verify(sysOut, times(8)).write(any(byte[].class), anyInt(), anyInt()); sysOutStream.reset(); nodeStates.clear(); @@ -1515,7 +1499,6 @@ public void testListClusterNodes() throws Exception { pw.close(); nodesReportStr = baos.toString("UTF-8"); assertEquals(nodesReportStr, sysOutStream.toString()); - verify(sysOut, times(9)).write(any(byte[].class), anyInt(), anyInt()); sysOutStream.reset(); nodeStates.clear(); @@ -1550,7 +1533,6 @@ public void testListClusterNodes() throws Exception { pw.close(); nodesReportStr = baos.toString("UTF-8"); assertEquals(nodesReportStr, sysOutStream.toString()); - verify(sysOut, times(10)).write(any(byte[].class), anyInt(), anyInt()); sysOutStream.reset(); result = cli.run(new String[] { "-list", "-states", "InvalidState"}); --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org