test_class.declarator: logger = LoggerFactory.getLogger(CommandTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger logger = LoggerFactory.getLogger(CommandTest.class);
test_class.type: Logger
test_class.var_name: logger
test_class.file: karate-core/src/test/java/com/intuit/karate/shell/CommandTest.java
test_class.identifier: CommandTest
test_case.body: @Test
      public void testCommand() {
          String cmd = FileUtils.isOsWindows() ? "print \"hello\"" : "ls";
          Command command = new Command(false, null, null, "target/command.log", new File("src"), cmd, "-al");
          command.start();
          int exitCode = command.waitSync();
          assertEquals(exitCode, 0);
      }
test_case.class_method_signature: CommandTest.testCommand()
test_case.full_signature: @Test public void testCommand()
test_case.identifier: testCommand
test_case.invocations: isOsWindows start waitSync assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCommand()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(Command.class)
focal_class.modifier: protected static final
focal_class.original_string: protected static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(Command.class);
focal_class.type: org.slf4j.Logger
focal_class.var_name: LOGGER
focal_class.declarator: useLineFeed
focal_class.modifier: private final
focal_class.original_string: private final boolean useLineFeed;
focal_class.type: boolean
focal_class.var_name: useLineFeed
focal_class.declarator: workingDir
focal_class.modifier: private final
focal_class.original_string: private final File workingDir;
focal_class.type: File
focal_class.var_name: workingDir
focal_class.declarator: uniqueName
focal_class.modifier: private final
focal_class.original_string: private final String uniqueName;
focal_class.type: String
focal_class.var_name: uniqueName
focal_class.declarator: logger
focal_class.modifier: private final
focal_class.original_string: private final Logger logger;
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: args
focal_class.modifier: private final
focal_class.original_string: private final String[] args;
focal_class.type: String[]
focal_class.var_name: args
focal_class.declarator: argList
focal_class.modifier: private final
focal_class.original_string: private final List argList;
focal_class.type: List
focal_class.var_name: argList
focal_class.declarator: sharedAppender
focal_class.modifier: private final
focal_class.original_string: private final boolean sharedAppender;
focal_class.type: boolean
focal_class.var_name: sharedAppender
focal_class.declarator: appender
focal_class.modifier: private final
focal_class.original_string: private final LogAppender appender;
focal_class.type: LogAppender
focal_class.var_name: appender
focal_class.declarator: environment
focal_class.modifier: private
focal_class.original_string: private Map<String, String> environment;
focal_class.type: Map<String, String>
focal_class.var_name: environment
focal_class.declarator: listener
focal_class.modifier: private
focal_class.original_string: private Consumer<String> listener;
focal_class.type: Consumer<String>
focal_class.var_name: listener
focal_class.declarator: errorListener
focal_class.modifier: private
focal_class.original_string: private Consumer<String> errorListener;
focal_class.type: Consumer<String>
focal_class.var_name: errorListener
focal_class.declarator: redirectErrorStream = true
focal_class.modifier: private
focal_class.original_string: private boolean redirectErrorStream = true;
focal_class.type: boolean
focal_class.var_name: redirectErrorStream
focal_class.declarator: sysOut
focal_class.modifier: private
focal_class.original_string: private Console sysOut;
focal_class.type: Console
focal_class.var_name: sysOut
focal_class.declarator: sysErr
focal_class.modifier: private
focal_class.original_string: private Console sysErr;
focal_class.type: Console
focal_class.var_name: sysErr
focal_class.declarator: process
focal_class.modifier: private
focal_class.original_string: private Process process;
focal_class.type: Process
focal_class.var_name: process
focal_class.declarator: exitCode = -1
focal_class.modifier: private
focal_class.original_string: private int exitCode = -1;
focal_class.type: int
focal_class.var_name: exitCode
focal_class.declarator: failureReason
focal_class.modifier: private
focal_class.original_string: private Exception failureReason;
focal_class.type: Exception
focal_class.var_name: failureReason
focal_class.declarator: PORTS_IN_USE = ConcurrentHashMap.newKeySet()
focal_class.modifier: private static final
focal_class.original_string: private static final Set<Integer> PORTS_IN_USE = ConcurrentHashMap.newKeySet();
focal_class.type: Set<Integer>
focal_class.var_name: PORTS_IN_USE
focal_class.declarator: SLEEP_TIME = 2000
focal_class.modifier: private static final
focal_class.original_string: private static final int SLEEP_TIME = 2000;
focal_class.type: int
focal_class.var_name: SLEEP_TIME
focal_class.declarator: POLL_ATTEMPTS_MAX = 30
focal_class.modifier: private static final
focal_class.original_string: private static final int POLL_ATTEMPTS_MAX = 30;
focal_class.type: int
focal_class.var_name: POLL_ATTEMPTS_MAX
focal_class.file: karate-core/src/main/java/com/intuit/karate/shell/Command.java
focal_class.identifier: Command
focal_class.class_method_signature: Command.isFailed()
focal_class.full_signature: public boolean isFailed()
focal_class.identifier: isFailed
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isFailed()
focal_class.class_method_signature: Command.getFailureReason()
focal_class.full_signature: public Exception getFailureReason()
focal_class.identifier: getFailureReason
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Exception
focal_class.signature: Exception getFailureReason()
focal_class.class_method_signature: Command.setEnvironment(Map<String, String> environment)
focal_class.full_signature: public void setEnvironment(Map<String, String> environment)
focal_class.identifier: setEnvironment
focal_class.modifiers: public
focal_class.parameters: (Map<String, String> environment)
focal_class.return: void
focal_class.signature: void setEnvironment(Map<String, String> environment)
focal_class.class_method_signature: Command.setListener(Consumer<String> listener)
focal_class.full_signature: public void setListener(Consumer<String> listener)
focal_class.identifier: setListener
focal_class.modifiers: public
focal_class.parameters: (Consumer<String> listener)
focal_class.return: void
focal_class.signature: void setListener(Consumer<String> listener)
focal_class.class_method_signature: Command.setErrorListener(Consumer<String> errorListener)
focal_class.full_signature: public void setErrorListener(Consumer<String> errorListener)
focal_class.identifier: setErrorListener
focal_class.modifiers: public
focal_class.parameters: (Consumer<String> errorListener)
focal_class.return: void
focal_class.signature: void setErrorListener(Consumer<String> errorListener)
focal_class.class_method_signature: Command.setRedirectErrorStream(boolean redirectErrorStream)
focal_class.full_signature: public void setRedirectErrorStream(boolean redirectErrorStream)
focal_class.identifier: setRedirectErrorStream
focal_class.modifiers: public
focal_class.parameters: (boolean redirectErrorStream)
focal_class.return: void
focal_class.signature: void setRedirectErrorStream(boolean redirectErrorStream)
focal_class.class_method_signature: Command.getSysOut()
focal_class.full_signature: public String getSysOut()
focal_class.identifier: getSysOut
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getSysOut()
focal_class.class_method_signature: Command.getSysErr()
focal_class.full_signature: public String getSysErr()
focal_class.identifier: getSysErr
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getSysErr()
focal_class.class_method_signature: Command.exec(boolean useLineFeed, File workingDir, String... args)
focal_class.full_signature: public static String exec(boolean useLineFeed, File workingDir, String... args)
focal_class.identifier: exec
focal_class.modifiers: public static
focal_class.parameters: (boolean useLineFeed, File workingDir, String... args)
focal_class.return: String
focal_class.signature: String exec(boolean useLineFeed, File workingDir, String... args)
focal_class.class_method_signature: Command.tokenize(String command)
focal_class.full_signature: public static String[] tokenize(String command)
focal_class.identifier: tokenize
focal_class.modifiers: public static
focal_class.parameters: (String command)
focal_class.return: String[]
focal_class.signature: String[] tokenize(String command)
focal_class.class_method_signature: Command.execLine(File workingDir, String command)
focal_class.full_signature: public static String execLine(File workingDir, String command)
focal_class.identifier: execLine
focal_class.modifiers: public static
focal_class.parameters: (File workingDir, String command)
focal_class.return: String
focal_class.signature: String execLine(File workingDir, String command)
focal_class.class_method_signature: Command.getBuildDir()
focal_class.full_signature: public static String getBuildDir()
focal_class.identifier: getBuildDir
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getBuildDir()
focal_class.class_method_signature: Command.getFreePort(int preferred)
focal_class.full_signature: public static synchronized int getFreePort(int preferred)
focal_class.identifier: getFreePort
focal_class.modifiers: public static synchronized
focal_class.parameters: (int preferred)
focal_class.return: int
focal_class.signature: int getFreePort(int preferred)
focal_class.class_method_signature: Command.sleep(int millis)
focal_class.full_signature: private static void sleep(int millis)
focal_class.identifier: sleep
focal_class.modifiers: private static
focal_class.parameters: (int millis)
focal_class.return: void
focal_class.signature: void sleep(int millis)
focal_class.class_method_signature: Command.waitForPort(String host, int port)
focal_class.full_signature: public static boolean waitForPort(String host, int port)
focal_class.identifier: waitForPort
focal_class.modifiers: public static
focal_class.parameters: (String host, int port)
focal_class.return: boolean
focal_class.signature: boolean waitForPort(String host, int port)
focal_class.class_method_signature: Command.waitForHttp(String url)
focal_class.full_signature: public static boolean waitForHttp(String url)
focal_class.identifier: waitForHttp
focal_class.modifiers: public static
focal_class.parameters: (String url)
focal_class.return: boolean
focal_class.signature: boolean waitForHttp(String url)
focal_class.class_method_signature: Command.waitForSocket(int port)
focal_class.full_signature: public static boolean waitForSocket(int port)
focal_class.identifier: waitForSocket
focal_class.modifiers: public static
focal_class.parameters: (int port)
focal_class.return: boolean
focal_class.signature: boolean waitForSocket(int port)
focal_class.class_method_signature: Command.Command(String... args)
focal_class.full_signature: public  Command(String... args)
focal_class.identifier: Command
focal_class.modifiers: public
focal_class.parameters: (String... args)
focal_class.signature:  Command(String... args)
focal_class.class_method_signature: Command.Command(boolean useLineFeed, File workingDir, String... args)
focal_class.full_signature: public  Command(boolean useLineFeed, File workingDir, String... args)
focal_class.identifier: Command
focal_class.modifiers: public
focal_class.parameters: (boolean useLineFeed, File workingDir, String... args)
focal_class.signature:  Command(boolean useLineFeed, File workingDir, String... args)
focal_class.class_method_signature: Command.Command(boolean useLineFeed, Logger logger, String uniqueName, String logFile, File workingDir, String... args)
focal_class.full_signature: public  Command(boolean useLineFeed, Logger logger, String uniqueName, String logFile, File workingDir, String... args)
focal_class.identifier: Command
focal_class.modifiers: public
focal_class.parameters: (boolean useLineFeed, Logger logger, String uniqueName, String logFile, File workingDir, String... args)
focal_class.signature:  Command(boolean useLineFeed, Logger logger, String uniqueName, String logFile, File workingDir, String... args)
focal_class.class_method_signature: Command.getEnvironment()
focal_class.full_signature: public Map<String, String> getEnvironment()
focal_class.identifier: getEnvironment
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> getEnvironment()
focal_class.class_method_signature: Command.getWorkingDir()
focal_class.full_signature: public File getWorkingDir()
focal_class.identifier: getWorkingDir
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: File
focal_class.signature: File getWorkingDir()
focal_class.class_method_signature: Command.getArgList()
focal_class.full_signature: public List getArgList()
focal_class.identifier: getArgList
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List
focal_class.signature: List getArgList()
focal_class.class_method_signature: Command.getLogger()
focal_class.full_signature: public Logger getLogger()
focal_class.identifier: getLogger
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Logger
focal_class.signature: Logger getLogger()
focal_class.class_method_signature: Command.getAppender()
focal_class.full_signature: public LogAppender getAppender()
focal_class.identifier: getAppender
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: LogAppender
focal_class.signature: LogAppender getAppender()
focal_class.class_method_signature: Command.getUniqueName()
focal_class.full_signature: public String getUniqueName()
focal_class.identifier: getUniqueName
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getUniqueName()
focal_class.class_method_signature: Command.getExitCode()
focal_class.full_signature: public int getExitCode()
focal_class.identifier: getExitCode
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getExitCode()
focal_class.class_method_signature: Command.waitSync()
focal_class.full_signature: public int waitSync()
focal_class.identifier: waitSync
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int waitSync()
focal_class.class_method_signature: Command.close(boolean force)
focal_class.full_signature: public void close(boolean force)
focal_class.identifier: close
focal_class.modifiers: public
focal_class.parameters: (boolean force)
focal_class.return: void
focal_class.signature: void close(boolean force)
focal_class.class_method_signature: Command.run()
focal_class.full_signature: @Override public void run()
focal_class.identifier: run
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void run()
focal_class.superclass: extends Thread
focal_method.body: public Command(String... args) {
          this(false, null, null, null, null, args);
      }
focal_method.class_method_signature: Command.Command(String... args)
focal_method.full_signature: public  Command(String... args)
focal_method.identifier: Command
focal_method.modifiers: public
focal_method.parameters: (String... args)
focal_method.signature:  Command(String... args)