Package net.grinder.common.processidentity

Examples of net.grinder.common.processidentity.AgentIdentity


  public void sleep(long millisecond) {
    ThreadUtils.sleep(millisecond);
  }

  protected AgentIdentity getAgentIdentity(Set<AgentIdentity> agentSet, int index) {
    AgentIdentity agentIdentity = null;
    Iterator<AgentIdentity> iterator = agentSet.iterator();
    for (int i = 0; i <= index; i++) {
      agentIdentity = iterator.next();
    }
    return agentIdentity;
View Full Code Here


    // Make one agent connect to console1
    GrinderProperties grinderProperties = new GrinderProperties();
    grinderProperties.setInt(GrinderProperties.CONSOLE_PORT, console1.getConsolePort());
    String localHostAddress = NetworkUtils.getLocalHostAddress();
    grinderProperties.setProperty(GrinderProperties.CONSOLE_HOST, localHostAddress);
    AgentIdentity next = getAgentIdentity(allAvailableAgents, 0);
    agentControllerServerDaemon.startAgent(grinderProperties, next);
    sleep(2000);
    assertThat(console1.getAllAttachedAgents().size(), is(1));

    // Shutdown agent controller and see agent is detached as well
View Full Code Here

  }

  @Test
  public void testStopAndStartAgentRepeatedly() {
    // Get one agent
    AgentIdentity agentIdentity = getAgentIdentity(allAvailableAgents, 0);

    // Start console
    SingleConsole console1 = new SingleConsole(getFreePort());
    console1.start();
View Full Code Here

TOP

Related Classes of net.grinder.common.processidentity.AgentIdentity

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.