MVCC: IgniteCacheConnectionRecovery10ConnectionsTest.testConnectionRecovery. This closes
@@ -36,6 +36,7 @@ import org.apache.ignite.internal.util.typedef.G;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.MvccFeatureChecker;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -44,6 +45,7 @@ import org.junit.runners.JUnit4;
import static java.util.concurrent.TimeUnit.SECONDS;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -71,7 +73,7 @@ public class IgniteCacheConnectionRecoveryTest extends GridCommonAbstractTest {
cfg.setCacheConfiguration(
cacheConfiguration("cache1", TRANSACTIONAL),
- //cacheConfiguration("cache2", TRANSACTIONAL_SNAPSHOT), //TODO IGNITE-10474: add Mvcc cache after fix.
+ cacheConfiguration("cache2", TRANSACTIONAL_SNAPSHOT),
cacheConfiguration("cache3", ATOMIC));
return cfg;
@@ -116,16 +118,26 @@ public class IgniteCacheConnectionRecoveryTest extends GridCommonAbstractTest {
IgniteCache[] caches = {
node.cache("cache1"),
-// node.cache("cache2"), //TODO IGNITE-10474: add Mvcc cache after fix.
+ node.cache("cache2"),
node.cache("cache3")};
int iter = 0;
while (U.currentTimeMillis() < stopTime) {
try {
- for (IgniteCache cache : caches)
+ for (IgniteCache cache : caches) {
+ while (true) {
+ try {
cache.putAllAsync(data).get(15, SECONDS);
+ break;
+ }
+ catch (Exception e) {
+ MvccFeatureChecker.assertMvccWriteConflict(e);
+ }
+ }
+ }
+
CyclicBarrier b = barrierRef.get();
if (b != null)
