use of org.apache.ignite.cache.CacheMode.REPLICATED in project ignite by apache.
the class CacheBlockOnReadAbstractTest method testUpdateBaselineTopologyTransactionalReplicated.
/**
* @throws Exception If failed.
*/
@Params(timeout = 5000L, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED)
@Test
public void testUpdateBaselineTopologyTransactionalReplicated() throws Exception {
doTest(asMessagePredicate(discoEvt -> {
if (discoEvt instanceof DiscoveryCustomEvent) {
DiscoveryCustomEvent discoCustomEvt = (DiscoveryCustomEvent) discoEvt;
DiscoveryCustomMessage customMsg = discoCustomEvt.customMessage();
return customMsg instanceof ChangeGlobalStateMessage;
}
return false;
}), () -> {
startNodesInClientMode(false);
IgniteEx ignite = startGrid(UUID.randomUUID().toString());
baseline.get(0).cluster().setBaselineTopology(baseline.get(0).context().discovery().topologyVersion());
baseline.add(ignite);
});
}
use of org.apache.ignite.cache.CacheMode.REPLICATED in project ignite by apache.
the class CacheBlockOnReadAbstractTest method testRestartBaselineTransactionalReplicated.
/**
* @throws Exception If failed.
*/
@Params(baseline = 4, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED)
@Test
public void testRestartBaselineTransactionalReplicated() throws Exception {
doTest(asMessagePredicate(discoEvt -> discoEvt.type() == EventType.EVT_NODE_JOINED), () -> {
IgniteEx node = baseline.get(baseline.size() - 1);
TestRecordingCommunicationSpi.spi(node).stopBlock();
stopGrid(node.name());
for (int i = 0; i < baselineServersCount() - 2; i++) cntFinishedReadOperations.countDown();
startGrid(node.name());
});
}
Aggregations