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 a59fdf8d03..1e93a0df39 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,9 +121,10 @@ public class ShellCommandExecutorTest { try { Object instance = shellCommandExecutorClass.newInstance(); - Method method = shellCommandExecutorClass.getDeclaredMethod("parseProcessOutput", new Class[]{}); + Method method = shellCommandExecutorClass.getDeclaredMethod("parseProcessOutput", new Class[]{Process.class}); method.setAccessible(true); - ShellCommandExecutor result = (ShellCommandExecutor) method.invoke(instance, new Object[]{}); + Object arg1s[] = {PowerMockito.mock(Process.class)}; + ShellCommandExecutor result = (ShellCommandExecutor) method.invoke(instance, arg1s); } catch (Exception e) { logger.error(e.getMessage()); }