From 6d9e496e9ce1809477712b1062840b09c1a5957e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=B8=85?= <62982788+597365581@users.noreply.github.com> Date: Mon, 1 Feb 2021 11:18:09 +0800 Subject: [PATCH] Update ShellCommandExecutorTest.java update unit test --- .../server/worker/shell/ShellCommandExecutorTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/worker/shell/ShellCommandExecutorTest.java b/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/worker/shell/ShellCommandExecutorTest.java index 2d339e0b69..5c4edeade0 100644 --- a/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/worker/shell/ShellCommandExecutorTest.java +++ b/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/worker/shell/ShellCommandExecutorTest.java @@ -121,7 +121,7 @@ public class ShellCommandExecutorTest { @Test public void testParseProcessOutput() { - Class shellCommandExecutorClass = ShellCommandExecutor.class; + Class shellCommandExecutorClass = AbstractCommandExecutor.class; try { Object instance = shellCommandExecutorClass.newInstance(); @@ -168,7 +168,7 @@ public class ShellCommandExecutorTest { logger.info("unit test"); } } }; - ShellCommandExecutor result = (ShellCommandExecutor) method.invoke(instance, arg1s); + AbstractCommandExecutor result = (AbstractCommandExecutor) method.invoke(instance, arg1s); } catch (Exception e) { logger.error(e.getMessage()); } @@ -176,14 +176,14 @@ public class ShellCommandExecutorTest { @Test public void testFindAppId() { - Class shellCommandExecutorClass = ShellCommandExecutor.class; + Class shellCommandExecutorClass = AbstractCommandExecutor.class; try { Object instance = shellCommandExecutorClass.newInstance(); Method method = shellCommandExecutorClass.getDeclaredMethod("findAppId", new Class[]{String.class}); method.setAccessible(true); Object[] arg1s = {"11111"}; - ShellCommandExecutor result = (ShellCommandExecutor) method.invoke(instance, arg1s); + AbstractCommandExecutor result = (AbstractCommandExecutor) method.invoke(instance, arg1s); } catch (Exception e) { logger.error(e.getMessage()); }