Repository: ignite Updated Branches: refs/heads/ignite-3479 d86ab340d -> 1791761ec
ignite-3479 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/84b9174d Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/84b9174d Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/84b9174d Branch: refs/heads/ignite-3479 Commit: 84b9174d6fc72e1c0387af444d41a853caae4c66 Parents: f4f21b7 Author: sboikov <[email protected]> Authored: Fri Sep 29 14:16:44 2017 +0300 Committer: sboikov <[email protected]> Committed: Fri Sep 29 14:16:44 2017 +0300 ---------------------------------------------------------------------- .../cache/mvcc/CacheMvccTransactionsTest.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/84b9174d/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java index ac16833..7799c88 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java @@ -55,6 +55,7 @@ import org.apache.ignite.internal.util.lang.GridInClosure3; import org.apache.ignite.internal.util.typedef.CI1; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.G; +import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteBiInClosure; @@ -1785,10 +1786,20 @@ public class CacheMvccTransactionsTest extends GridCommonAbstractTest { for (Integer key : keys) vals.put(key, i); - try (Transaction tx = getNode.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) { - cache.putAll(vals); + while (true) { + try (Transaction tx = getNode.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) { + cache.putAll(vals); - tx.commit(); + tx.commit(); + + break; + } + catch (Exception e) { + if (!X.hasCause(e, ClusterTopologyException.class)) + fail("Unexpected error: " + e); + else + info("Tx error, need retry: " + e); + } } } @@ -2181,6 +2192,8 @@ public class CacheMvccTransactionsTest extends GridCommonAbstractTest { stopGrid(0); + awaitPartitionMapExchange(); + checkCoordinatorsConsistency(5); }
