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 5a848dfb68..3f65ec87f5 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 @@ -28,6 +28,7 @@ import org.apache.dolphinscheduler.common.enums.ExecutionStatus; import org.apache.dolphinscheduler.common.utils.LoggerUtils; import org.apache.dolphinscheduler.common.utils.OSUtils; import org.apache.dolphinscheduler.dao.entity.TaskInstance; +import org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor; import org.apache.dolphinscheduler.server.worker.task.AbstractTask; import org.apache.dolphinscheduler.server.worker.task.ShellCommandExecutor; import org.apache.dolphinscheduler.server.worker.task.TaskProps; @@ -172,4 +173,36 @@ public class ShellCommandExecutorTest { logger.error(e.getMessage()); } } + + @Test + public void testFindAppId(){ + Class shellCommandExecutorClass = ShellCommandExecutor.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); + } + catch (Exception e){ + logger.error(e.getMessage()); + } + } + + @Test + public void testConvertFile2List(){ + Class shellCommandExecutorClass = AbstractCommandExecutor.class; + try{ + Object instance = shellCommandExecutorClass.newInstance(); + + Method method = shellCommandExecutorClass.getDeclaredMethod("convertFile2List", new Class[]{String.class}); + method.setAccessible(true); + Object[] arg1s = {"/opt/1.txt"}; + AbstractCommandExecutor result = (AbstractCommandExecutor) method.invoke(instance, arg1s); + } + catch (Exception e){ + logger.error(e.getMessage()); + } + } }