Browse Source

Update ShellCommandExecutorTest.java

add unit test
pull/3/MERGE
小清 4 years ago committed by GitHub
parent
commit
720b36f284
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/worker/shell/ShellCommandExecutorTest.java

2
dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/worker/shell/ShellCommandExecutorTest.java

@ -123,7 +123,7 @@ public class ShellCommandExecutorTest {
Method method = shellCommandExecutorClass.getDeclaredMethod("parseProcessOutput", new Class[]{Process.class}); Method method = shellCommandExecutorClass.getDeclaredMethod("parseProcessOutput", new Class[]{Process.class});
method.setAccessible(true); method.setAccessible(true);
Object arg1s[] = {PowerMockito.mock(Process.class)}; Object[] arg1s = {PowerMockito.mock(Process.class)};
ShellCommandExecutor result = (ShellCommandExecutor) method.invoke(instance, arg1s); ShellCommandExecutor result = (ShellCommandExecutor) method.invoke(instance, arg1s);
} catch (Exception e) { } catch (Exception e) {
logger.error(e.getMessage()); logger.error(e.getMessage());

Loading…
Cancel
Save