Search in sources :

Example 21 with GridSpiTestContext

use of org.apache.ignite.testframework.GridSpiTestContext in project ignite by apache.

the class GridJobStealingFailoverSpiSelfTest method initSpiContext.

/** {@inheritDoc} */
@Override
protected GridSpiTestContext initSpiContext() throws Exception {
    GridSpiTestContext ctx = super.initSpiContext();
    GridTestNode loc = new GridTestNode(UUID.randomUUID());
    addSpiDependency(loc);
    ctx.setLocalNode(loc);
    GridTestNode rmt = new GridTestNode(UUID.randomUUID());
    ctx.addNode(rmt);
    addSpiDependency(rmt);
    return ctx;
}
Also used : GridSpiTestContext(org.apache.ignite.testframework.GridSpiTestContext) GridTestNode(org.apache.ignite.testframework.GridTestNode)

Example 22 with GridSpiTestContext

use of org.apache.ignite.testframework.GridSpiTestContext in project ignite by apache.

the class GridRoundRobinLoadBalancingSpiTopologyChangeSelfTest method initSpiContext.

/** {@inheritDoc} */
@Override
protected GridSpiTestContext initSpiContext() throws Exception {
    GridSpiTestContext spiCtx = super.initSpiContext();
    spiCtx.createLocalNode();
    spiCtx.createRemoteNodes(10);
    return spiCtx;
}
Also used : GridSpiTestContext(org.apache.ignite.testframework.GridSpiTestContext)

Aggregations

GridSpiTestContext (org.apache.ignite.testframework.GridSpiTestContext)22 GridTestNode (org.apache.ignite.testframework.GridTestNode)17 ClusterNode (org.apache.ignite.cluster.ClusterNode)8 IgniteTestResources (org.apache.ignite.testframework.junits.IgniteTestResources)8 HashMap (java.util.HashMap)7 Map (java.util.Map)5 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)4 IgniteMock (org.apache.ignite.testframework.junits.IgniteMock)4 Message (org.apache.ignite.plugin.extensions.communication.Message)3 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)2 ClusterMetricsSnapshot (org.apache.ignite.internal.ClusterMetricsSnapshot)2 GridTestMessage (org.apache.ignite.spi.communication.GridTestMessage)2 Serializable (java.io.Serializable)1 Collection (java.util.Collection)1 ConcurrentMap (java.util.concurrent.ConcurrentMap)1 GridTimeoutProcessor (org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor)1 IgniteProductVersion.fromString (org.apache.ignite.lang.IgniteProductVersion.fromString)1 GridTestKernalContext (org.apache.ignite.testframework.junits.GridTestKernalContext)1