Ejemplo n.º 1
0
  /**
   * Loads test configuration.
   *
   * @throws Exception if configuration is unawailable or broken.
   */
  private void loadTestConfiguration() throws Exception {
    assert TEST_CONFIGURATION_FILE.isFile();

    InputStream in = null;

    Properties p = new Properties();

    try {
      in = new FileInputStream(TEST_CONFIGURATION_FILE);

      p.load(in);
    } finally {
      U.closeQuiet(in);
    }

    clientNodes = Integer.parseInt(p.getProperty("client.nodes.count"));
    srvNodes = Integer.parseInt(p.getProperty("server.nodes.count"));
    threadsPerClient = Integer.parseInt(p.getProperty("threads.per.client"));
    cancelRate = Integer.parseInt(p.getProperty("cancel.rate"));
    submitDelay = Long.parseLong(p.getProperty("submit.delay"));

    taskParams =
        new GridJobLoadTestParams(
            Integer.parseInt(p.getProperty("jobs.count")),
            Integer.parseInt(p.getProperty("jobs.test.duration")),
            Integer.parseInt(p.getProperty("jobs.test.completion.delay")),
            Double.parseDouble(p.getProperty("jobs.failure.probability")));
  }