MVCC: IgniteClientReconnectCacheTest.testReconnectOperationInProgress fixed. This closes
@@ -70,6 +70,7 @@ import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
import org.apache.ignite.spi.discovery.DiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.MvccFeatureChecker;
import org.apache.ignite.transactions.Transaction;
import org.apache.ignite.transactions.TransactionConcurrency;
import org.apache.ignite.transactions.TransactionIsolation;
@@ -840,7 +841,19 @@ public class IgniteClientReconnectCacheTest extends IgniteClientReconnectAbstrac
IgniteInClosure<IgniteCache<Object, Object>> putOp = new CI1<IgniteCache<Object, Object>>() {
@Override public void apply(IgniteCache<Object, Object> cache) {
+ while (true) {
+ try {
cache.put(1, 1);
+
+ break;
+ }
+ catch (Exception e) {
+ if (e.getCause() instanceof IgniteClientDisconnectedException)
+ throw e;
+ else
+ MvccFeatureChecker.assertMvccWriteConflict(e);
+ }
+ }
}
};
@@ -1444,8 +1457,17 @@ public class IgniteClientReconnectCacheTest extends IgniteClientReconnectAbstrac
assertNotEquals(id, client.localNode().id());
+ while (true) {
+ try {
cache.put(1, 1);
+ break;
+ }
+ catch (Exception e) {
+ MvccFeatureChecker.assertMvccWriteConflict(e);
+ }
+ }
+
GridTestUtils.waitForCondition(new GridAbsPredicate() {
@Override public boolean apply() {
return cache.get(1) != null;
