org.gridgain.grid.test
Interface GridTestRouter
- All Known Implementing Classes:
- GridTestRouterAdapter
public interface GridTestRouter
Optional router used to route individual tests to remote nodes for
execution. Distributed JUnits can be instructed to use a specific
implementation of this router in one of the following ways:
If not provided, then by default GridTestRouterAdapter is used which routes tests to
grid nodes in round-robin fashion. Refer to GridTestRouterAdapter documentation for
more information.
-
route
GridNode route(Class<?> test,
String name,
Collection<GridNode> subgrid,
UUID locNodeId)
- Routes a test to a specific node. This method is provided so subclasses
could specify their own logic for routing tests. It should be useful
when some test can only be run on a specific node or on a specific
set of nodes.
By default tests are routed to grid nodes in round-robin fashion.
Set GridTestVmParameters.GRIDGAIN_ROUTER_PREFER_REMOTE VM parameter
to true to always route tests to remote nodes, assuming there are any.
If there are no remote nodes, then tests will still execute locally even
if this VM parameter is set.
- Parameters:
test - Test class.name - Test name.subgrid - List of available grid nodes.locNodeId - Local node ID.
- Returns:
- Node this test should execute on.