use of org.apache.ignite.events.EventType.EVT_CONSISTENCY_VIOLATION in project ignite by apache.
the class AbstractReadRepairTest method beforeTestsStarted.
/**
* {@inheritDoc}
*/
@Override
protected void beforeTestsStarted() throws Exception {
super.beforeTestsStarted();
if (persistenceEnabled())
cleanPersistenceDir();
// Server nodes.
Ignite ignite = startGrids(serverNodesCount());
// Client node 1.
startClientGrid(G.allGrids().size() + 1);
// Client node 2.
startClientGrid(G.allGrids().size() + 1);
final IgniteEvents evts = ignite.events();
evts.remoteListen(null, (IgnitePredicate<Event>) e -> {
assert e instanceof CacheConsistencyViolationEvent;
evtDeq.add((CacheConsistencyViolationEvent) e);
return true;
}, EVT_CONSISTENCY_VIOLATION);
if (persistenceEnabled())
ignite.cluster().state(ClusterState.ACTIVE);
ignite.getOrCreateCache(cacheConfiguration());
awaitPartitionMapExchange();
}
Aggregations