mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-03 20:58:11 +08:00
Update ShellCommandExecutorTest.java
update unit test
This commit is contained in:
parent
83bd0ce78b
commit
d48e035362
@ -27,7 +27,6 @@ import org.apache.dolphinscheduler.dao.entity.TaskInstance;
|
|||||||
import org.apache.dolphinscheduler.server.entity.TaskExecutionContext;
|
import org.apache.dolphinscheduler.server.entity.TaskExecutionContext;
|
||||||
import org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor;
|
import org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor;
|
||||||
import org.apache.dolphinscheduler.server.worker.task.AbstractTask;
|
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.server.worker.task.TaskProps;
|
||||||
import org.apache.dolphinscheduler.service.bean.SpringApplicationContext;
|
import org.apache.dolphinscheduler.service.bean.SpringApplicationContext;
|
||||||
import org.apache.dolphinscheduler.service.process.ProcessService;
|
import org.apache.dolphinscheduler.service.process.ProcessService;
|
||||||
@ -134,7 +133,7 @@ public class ShellCommandExecutorTest {
|
|||||||
return new OutputStream() {
|
return new OutputStream() {
|
||||||
@Override
|
@Override
|
||||||
public void write(int b) throws IOException {
|
public void write(int b) throws IOException {
|
||||||
|
logger.info("unit test");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -182,9 +181,8 @@ public class ShellCommandExecutorTest {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void createCommandFileIfNotExists(String execCommand, String commandFile) throws IOException {
|
protected void createCommandFileIfNotExists(String execCommand, String commandFile) throws IOException {
|
||||||
|
logger.info("unit test");
|
||||||
}
|
} }, arg1s);
|
||||||
}, arg1s);
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(e.getMessage());
|
logger.error(e.getMessage());
|
||||||
}
|
}
|
||||||
@ -211,9 +209,8 @@ public class ShellCommandExecutorTest {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void createCommandFileIfNotExists(String execCommand, String commandFile) throws IOException {
|
protected void createCommandFileIfNotExists(String execCommand, String commandFile) throws IOException {
|
||||||
|
logger.info("unit test");
|
||||||
}
|
} }, arg1s);
|
||||||
}, arg1s);
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(e.getMessage());
|
logger.error(e.getMessage());
|
||||||
}
|
}
|
||||||
@ -239,9 +236,8 @@ public class ShellCommandExecutorTest {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void createCommandFileIfNotExists(String execCommand, String commandFile) throws IOException {
|
protected void createCommandFileIfNotExists(String execCommand, String commandFile) throws IOException {
|
||||||
|
logger.info("unit test");
|
||||||
}
|
} }, arg1s);
|
||||||
}, arg1s);
|
|
||||||
Assert.assertTrue(true);
|
Assert.assertTrue(true);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(e.getMessage());
|
logger.error(e.getMessage());
|
||||||
|
Loading…
Reference in New Issue
Block a user