use of org.apache.ignite.internal.visor.verify.ValidateIndexesClosure in project ignite by apache.
the class RebuildIndexWithHistoricalRebalanceTest method shouldRebuldIndexForMovingPartitionWithHistoricalRebalance.
/**
*/
@Test
// Use only historical rebalance
@WithSystemProperty(key = IGNITE_PDS_WAL_REBALANCE_THRESHOLD, value = "0")
public void shouldRebuldIndexForMovingPartitionWithHistoricalRebalance() throws Exception {
IgniteEx node1 = startGrid(0);
startGrid(1);
node1.cluster().active(true);
IgniteCache<UserKey, UserValue> cache = node1.getOrCreateCache(CACHE_NAME);
cache.put(new UserKey(1), new UserValue(333));
stopGrid(1);
cache.put(new UserKey(2), new UserValue(555));
SUPPLY_MESSAGE_LATCH.set(new CountDownLatch(1));
removeIndexBin(1);
LogListener rebuildLsnr = finishIndexRebuildLsnr(CACHE_NAME);
IgniteEx node2 = startGrid(1);
assertTrue(GridTestUtils.waitForCondition(rebuildLsnr::check, 10_000));
SUPPLY_MESSAGE_LATCH.get().countDown();
awaitPartitionMapExchange();
ValidateIndexesClosure clo = new ValidateIndexesClosure(() -> false, Collections.singleton(CACHE_NAME), 0, 0, false, true);
node2.context().resource().injectGeneric(clo);
VisorValidateIndexesJobResult res = clo.call();
assertFalse(res.hasIssues());
}
Aggregations