mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-02 20:28:03 +08:00
Update ShellCommandExecutorTest.java
update unit test
This commit is contained in:
parent
6ba290c452
commit
3cba3e803c
@ -175,33 +175,31 @@ public class ShellCommandExecutorTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFindAppId(){
|
||||
public void testFindAppId() {
|
||||
Class<ShellCommandExecutor> shellCommandExecutorClass = ShellCommandExecutor.class;
|
||||
try{
|
||||
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){
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConvertFile2List(){
|
||||
public void testConvertFile2List() {
|
||||
Class<AbstractCommandExecutor> shellCommandExecutorClass = AbstractCommandExecutor.class;
|
||||
try{
|
||||
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){
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user