Removed delaying communication SPI from tests
@@ -46,17 +46,12 @@ import org.apache.ignite.configuration.WALMode;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.internal.IgniteInterruptedCheckedException;
-import org.apache.ignite.internal.TestDelayingCommunicationSpi;
-import org.apache.ignite.internal.managers.communication.GridIoMessage;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopology;
-import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionDemandMessage;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionFullMap;
-import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessage;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.lang.IgnitePredicate;
-import org.apache.ignite.plugin.extensions.communication.Message;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.GridTestUtils;
@@ -79,9 +74,6 @@ public class CacheBaselineTopologyTest extends GridCommonAbstractTest {
/** */
private static final int NODE_COUNT = 4;
- /** */
- private boolean delayRebalance;
-
/** */
private boolean disableAutoActivation;
@@ -151,16 +143,13 @@ public class CacheBaselineTopologyTest extends GridCommonAbstractTest {
if (client)
cfg.setClientMode(true);
- if (delayRebalance)
- cfg.setCommunicationSpi(new DelayRebalanceCommunicationSpi());
-
return cfg;
}
/**
* Verifies that rebalance on cache with Node Filter happens when BaselineTopology changes.
*
- * @throws Exception
+ * @throws Exception If failed.
*/
public void testRebalanceForCacheWithNodeFilter() throws Exception {
try {
@@ -846,8 +835,6 @@ public class CacheBaselineTopologyTest extends GridCommonAbstractTest {
* @throws Exception if failed.
*/
public void testAffinityAssignmentChangedAfterRestart() throws Exception {
- delayRebalance = false;
-
int parts = 32;
final List<Integer> partMapping = new ArrayList<>();
@@ -890,8 +877,6 @@ public class CacheBaselineTopologyTest extends GridCommonAbstractTest {
Collections.shuffle(TestAffinityFunction.partsAffMapping, new Random(1));
- delayRebalance = true;
-
/* There is a problem with handling simultaneous auto activation after restart and manual activation.
To properly catch the moment when cluster activation has finished we temporary disable auto activation. */
disableAutoActivation = true;
@@ -1035,22 +1020,4 @@ public class CacheBaselineTopologyTest extends GridCommonAbstractTest {
delegate.removeNode(nodeId);
}
}
-
- /**
- *
- */
- private static class DelayRebalanceCommunicationSpi extends TestDelayingCommunicationSpi {
- /** {@inheritDoc} */
- @Override protected boolean delayMessage(Message msg, GridIoMessage ioMsg) {
- if (msg != null && (msg instanceof GridDhtPartitionDemandMessage || msg instanceof GridDhtPartitionSupplyMessage))
- return true;
-
- return false;
- }
-
- /** {@inheritDoc} */
- @Override protected int delayMillis() {
- return 1_000_000;
- }
- }
}
