Class InboundAgentRule

  • All Implemented Interfaces:
    org.junit.rules.TestRule

    public final class InboundAgentRule
    extends org.junit.rules.ExternalResource
    Manages inbound agents. While these run on the local host, they are launched outside of Jenkins.

    To avoid flakiness when tearing down the test, ensure that the agent has gone offline with:

     Slave agent = inboundAgents.createAgent(r, […]);
     r.waitOnline(agent);
     try {
         […]
     } finally {
         inboundAgents.stop(r, agent.getNodeName());
     }
     
    See Also:
    JenkinsRule.createComputerLauncher(hudson.EnvVars), JenkinsRule.createSlave()