task.part().group().preloader().rebalanceFuture().listen(f -> cleanupQueue.add(task));
/** * @throws Exception Exception. */ @Test public void testNodeFailedAtRebalancing() throws Exception { IgniteEx ignite = startGrid(0); generateData(ignite, 0, 0); log.info("Preloading started."); startGrid(1); GridDhtPartitionDemander.RebalanceFuture fut = (GridDhtPartitionDemander.RebalanceFuture)grid(1).context(). cache().internalCache(CACHE_NAME_DHT_REPLICATED).preloader().rebalanceFuture(); fut.get(); U.sleep(10); ((TestTcpDiscoverySpi)grid(1).configuration().getDiscoverySpi()).simulateNodeFailure(); awaitPartitionMapExchange(false, false, Collections.singletonList(ignite.localNode())); checkSupplyContextMapIsEmpty(); } }
((GridDhtPartitionDemander.RebalanceFuture) preloader.rebalanceFuture()).topologyVersion().equals(curTopVer), getTestTimeout() ); Boolean result = preloader.rebalanceFuture().get(); Assert.assertEquals("Rebalance should be cancelled on demander node: " + preloader.rebalanceFuture(), false, result);
cache().internalCache(DHT_PARTITIONED_CACHE).preloader().rebalanceFuture();
task.part().group().preloader().rebalanceFuture().listen(f -> cleanupQueue.add(task));