Package org.apache.hive.ptest.api.request

Examples of org.apache.hive.ptest.api.request.TestStartRequest


  private File profileProperties;


  @Before
  public void setup() throws Exception {
    startRequest = new TestStartRequest();
    startRequest.setProfile(PROFILE);
    startRequest.setTestHandle(TEST_HANDLE);
    test = new Test(startRequest, Status.pending(), System.currentTimeMillis());
    testQueue = new ArrayBlockingQueue<Test>(1);
    executionContextConfiguration = mock(ExecutionContextConfiguration.class);
View Full Code Here


          test.setDequeueTime(System.currentTimeMillis());
          if(mExecutionContext == null) {
            mExecutionContext = createExceutionContext();
          }
          test.setExecutionStartTime(System.currentTimeMillis());
          TestStartRequest startRequest = test.getStartRequest();
          String profile = startRequest.getProfile();
          File profileConfFile = new File(mExecutionContextConfiguration.getProfileDirectory(),
              String.format("%s.properties", profile));
          if(!profileConfFile.isFile()) {
            test.setStatus(Status.illegalArgument("Profile " + profile + " not found"));
            test.setExecutionFinishTime(System.currentTimeMillis());
          } else {
            File logDir = Dirs.create(new File(mExecutionContextConfiguration.
                getGlobalLogDirectory(), test.getStartRequest().getTestHandle()));
            File logFile = new File(logDir, "execution.txt");
            test.setOutputFile(logFile);
            logStream = new PrintStream(logFile);
            logger = new TestLogger(logStream, TestLogger.LEVEL.DEBUG);
            TestConfiguration testConfiguration = TestConfiguration.fromFile(profileConfFile, logger);
            testConfiguration.setPatch(startRequest.getPatchURL());
            testConfiguration.setJiraName(startRequest.getJiraName());
            testConfiguration.setClearLibraryCache(startRequest.isClearLibraryCache());
            LocalCommandFactory localCommandFactory = new LocalCommandFactory(logger);
            PTest ptest = mPTestBuilder.build(testConfiguration, mExecutionContext,
                test.getStartRequest().getTestHandle(), logDir,
                localCommandFactory, new SSHCommandExecutor(logger),
                new RSyncCommandExecutor(logger, mExecutionContextConfiguration.getMaxRsyncThreads(),
View Full Code Here

      byte[] bytes = Resources.toByteArray(new URL(patch));
      if(bytes.length == 0) {
        throw new IllegalArgumentException("Patch " + patch + " was zero bytes");
      }
    }
    TestStartRequest startRequest = new TestStartRequest(profile, testHandle, jira, patch, clearLibraryCache);
    post(startRequest, false);
    boolean result = false;
    try {
      result = testTailLog(testHandle);
      if(testOutputDir != null) {
View Full Code Here

          test.setDequeueTime(System.currentTimeMillis());
          if(mExecutionContext == null) {
            mExecutionContext = createExceutionContext();
          }
          test.setExecutionStartTime(System.currentTimeMillis());
          TestStartRequest startRequest = test.getStartRequest();
          String profile = startRequest.getProfile();
          File profileConfFile = new File(mExecutionContextConfiguration.getProfileDirectory(),
              String.format("%s.properties", profile));
          if(!profileConfFile.isFile()) {
            test.setStatus(Status.illegalArgument("Profile " + profile + " not found"));
            test.setExecutionFinishTime(System.currentTimeMillis());
          } else {
            File logDir = Dirs.create(new File(mExecutionContextConfiguration.
                getGlobalLogDirectory(), test.getStartRequest().getTestHandle()));
            File logFile = new File(logDir, "execution.txt");
            test.setOutputFile(logFile);
            logStream = new PrintStream(logFile);
            logger = new TestLogger(logStream, TestLogger.LEVEL.DEBUG);
            TestConfiguration testConfiguration = TestConfiguration.fromFile(profileConfFile, logger);
            testConfiguration.setPatch(startRequest.getPatchURL());
            testConfiguration.setJiraName(startRequest.getJiraName());
            testConfiguration.setClearLibraryCache(startRequest.isClearLibraryCache());
            PTest ptest = mPTestBuilder.build(testConfiguration, mExecutionContext,
                test.getStartRequest().getTestHandle(), logDir,
                new LocalCommandFactory(logger), new SSHCommandExecutor(logger),
                new RSyncCommandExecutor(logger), logger);
            int result = ptest.run();
View Full Code Here

      byte[] bytes = Resources.toByteArray(new URL(patch));
      if(bytes.length == 0) {
        throw new IllegalArgumentException("Patch " + patch + " was zero bytes");
      }
    }
    TestStartRequest startRequest = new TestStartRequest(profile, testHandle, jira, patch, clearLibraryCache);
    post(startRequest, false);
    boolean result = false;
    try {
      result = testTailLog(testHandle);
      if(testOutputDir != null) {
View Full Code Here

TOP

Related Classes of org.apache.hive.ptest.api.request.TestStartRequest

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.