Class InboundAgentRule

java.lang.Object
org.junit.rules.ExternalResource
org.jvnet.hudson.test.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, […]);
 try {
     […]
 } finally {
     inboundAgents.stop(r, agent.getNodeName());
 }
 
See Also: