Package org.ngrinder.script.handler

Examples of org.ngrinder.script.handler.ProcessingResultPrintStream


            checkNotEmpty(perfTest.getScriptName(), "perfTest should have script name"),
            getSafe(perfTest.getScriptRevision())), "script should exist");
    // Get all files in the script path
    ScriptHandler handler = scriptHandlerFactory.getHandler(scriptEntry);

    ProcessingResultPrintStream processingResult = new ProcessingResultPrintStream(new ByteArrayOutputStream());
    handler.prepareDist(perfTest.getId(), user, scriptEntry, perfTestDistDirectory, config.getControllerProperties(),
        processingResult);
    LOGGER.info("File write is completed in {}", perfTestDistDirectory);
    if (!processingResult.isSuccess()) {
      File logDir = new File(getLogFileDirectory(perfTest), "distribution_log.txt");
      try {
        FileUtils.writeByteArrayToFile(logDir, processingResult.getLogByteArray());
      } catch (IOException e) {
        noOp();
      }
      throw processException("Error while file distribution is prepared.");
    }
View Full Code Here


      }
      File scriptDirectory = config.getHome().getScriptDirectory(user);
      FileUtils.deleteDirectory(scriptDirectory);
      Preconditions.checkTrue(scriptDirectory.mkdirs(), "Script directory {} creation is failed.");

      ProcessingResultPrintStream processingResult = new ProcessingResultPrintStream(new ByteArrayOutputStream());
      handler.prepareDist(0L, user, scriptEntry, scriptDirectory, config.getControllerProperties(), processingResult);
      if (!processingResult.isSuccess()) {
        return new String(processingResult.getLogByteArray());
      }
      File scriptFile = new File(scriptDirectory, FilenameUtils.getName(scriptEntry.getPath()));

      if (useScriptInSVN) {
        fileEntryService.writeContentTo(user, scriptEntry.getPath(), scriptDirectory);
View Full Code Here

TOP

Related Classes of org.ngrinder.script.handler.ProcessingResultPrintStream

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.