Package net.grinder.util.thread

Examples of net.grinder.util.thread.Condition


  }

  @Test
  public void testValidation() throws EngineException, DirectoryException, IOException {
    File file = new ClassPathResource("/validation/script_1time.py").getFile();
    Condition m_eventSync = new Condition();
    File log = validationService.doValidate(file.getParentFile(), file, m_eventSync, false, "");
    assertThat(log.length(), greaterThan(1000L));
  }
View Full Code Here


   * @param safe     safe mode
   */
  public void distributeFiles(ListenerSupport<FileDistributionListener> listener, final boolean safe) {
    final FileDistribution fileDistribution = getConsoleComponent(FileDistribution.class);
    final AgentCacheState agentCacheState = fileDistribution.getAgentCacheState();
    final Condition cacheStateCondition = new Condition();
    agentCacheState.addListener(new PropertyChangeListener() {
      public void propertyChange(PropertyChangeEvent ignored) {
        synchronized (cacheStateCondition) {
          cacheStateCondition.notifyAll();
        }
      }
    });
    final MutableBoolean safeDist = new MutableBoolean(safe);
    ConsoleProperties consoleComponent = getConsoleComponent(ConsoleProperties.class);
View Full Code Here

        fileEntryService.writeContentTo(user, scriptEntry.getPath(), scriptDirectory);
      } else {
        FileUtils.writeStringToFile(scriptFile, scriptEntry.getContent(),
            StringUtils.defaultIfBlank(scriptEntry.getEncoding(), "UTF-8"));
      }
      File doValidate = localScriptTestDriveService.doValidate(scriptDirectory, scriptFile, new Condition(),
          config.isSecurityEnabled(), hostString, getTimeout());
      List<String> readLines = FileUtils.readLines(doValidate);
      StringBuilder output = new StringBuilder();
      String path = config.getHome().getDirectory().getAbsolutePath();
      for (String each : readLines) {
View Full Code Here

TOP

Related Classes of net.grinder.util.thread.Condition

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.