use of org.apache.ignite.internal.processors.cache.verify.IdleVerifyResultV2 in project ignite by apache.
the class IgniteClusterSnapshotCheckWithIndexesTest method testClusterSnapshotCheckWithNodeFilter.
/**
* @throws Exception If failed.
*/
@Test
public void testClusterSnapshotCheckWithNodeFilter() throws Exception {
startGridsWithoutCache(2);
IgniteCache<Integer, Account> cache1 = grid(0).createCache(txFilteredCache("cache0").setNodeFilter(new SelfNodeFilter(grid(0).localNode().id())));
IgniteCache<Integer, Account> cache2 = grid(1).createCache(txFilteredCache("cache1").setNodeFilter(new SelfNodeFilter(grid(1).localNode().id())));
for (int i = 0; i < CACHE_KEYS_RANGE; i++) {
cache1.put(i, new Account(i, i));
cache2.put(i, new Account(i, i));
}
grid(0).snapshot().createSnapshot(SNAPSHOT_NAME).get(TIMEOUT);
IdleVerifyResultV2 res = grid(0).context().cache().context().snapshotMgr().checkSnapshot(SNAPSHOT_NAME).get();
StringBuilder b = new StringBuilder();
res.print(b::append, true);
assertTrue("Exceptions: " + b, F.isEmpty(res.exceptions()));
assertContains(log, b.toString(), "The check procedure has finished, no conflicts have been found.");
}
Aggregations