From d48e035362dfc9adafb55d44009582615e8a110d 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 13:16:40 +0800 Subject: [PATCH] Update ShellCommandExecutorTest.java update unit test --- .../worker/shell/ShellCommandExecutorTest.java | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 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 fe22fe19ef..c1c3954df6 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 @@ -27,7 +27,6 @@ import org.apache.dolphinscheduler.dao.entity.TaskInstance; import org.apache.dolphinscheduler.server.entity.TaskExecutionContext; 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; import org.apache.dolphinscheduler.service.bean.SpringApplicationContext; import org.apache.dolphinscheduler.service.process.ProcessService; @@ -134,7 +133,7 @@ public class ShellCommandExecutorTest { return new OutputStream() { @Override public void write(int b) throws IOException { - + logger.info("unit test"); } }; } @@ -182,9 +181,8 @@ public class ShellCommandExecutorTest { @Override protected void createCommandFileIfNotExists(String execCommand, String commandFile) throws IOException { - - } - }, arg1s); + logger.info("unit test"); + } }, arg1s); } catch (Exception e) { logger.error(e.getMessage()); } @@ -211,9 +209,8 @@ public class ShellCommandExecutorTest { @Override protected void createCommandFileIfNotExists(String execCommand, String commandFile) throws IOException { - - } - }, arg1s); + logger.info("unit test"); + } }, arg1s); } catch (Exception e) { logger.error(e.getMessage()); } @@ -239,9 +236,8 @@ public class ShellCommandExecutorTest { @Override protected void createCommandFileIfNotExists(String execCommand, String commandFile) throws IOException { - - } - }, arg1s); + logger.info("unit test"); + } }, arg1s); Assert.assertTrue(true); } catch (Exception e) { logger.error(e.getMessage());