Package org.apache.hive.ptest.execution

Examples of org.apache.hive.ptest.execution.LocalCommand$CollectPolicy


    localCommandFactory = new MockLocalCommandFactory(LOG);
  }

  @Test
  public void testShutdownBeforeWaitFor() throws Exception {
    LocalCommand localCommand = mock(LocalCommand.class);
    localCommandFactory.setInstance(localCommand);
    RSyncCommandExecutor executor = new RSyncCommandExecutor(LOG, localCommandFactory);
    Assert.assertFalse(executor.isShutdown());
    executor.shutdownNow();
    RSyncCommand command = new RSyncCommand(executor, "privateKey", "user", "host", 1, "local", "remote", RSyncCommand.Type.FROM_LOCAL);
View Full Code Here


    }
    verify(localCommand, times(1)).kill();
  }
  @Test
  public void testShutdownDuringWaitFor() throws Exception {
    LocalCommand localCommand = mock(LocalCommand.class);
    localCommandFactory.setInstance(localCommand);
    final RSyncCommandExecutor executor = new RSyncCommandExecutor(LOG, localCommandFactory);
    Assert.assertFalse(executor.isShutdown());
    when(localCommand.getExitCode()).thenAnswer(new Answer<Integer>() {
      @Override
      public Integer answer(InvocationOnMock invocation) throws Throwable {
        executor.shutdownNow();
        return Constants.EXIT_CODE_UNKNOWN;
      }
View Full Code Here

TOP

Related Classes of org.apache.hive.ptest.execution.LocalCommand$CollectPolicy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.