Repository: ignite Updated Branches: refs/heads/ignite-1349 71db9d323 -> 75616dfc0
ignite-1349 Fixed test. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/75616dfc Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/75616dfc Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/75616dfc Branch: refs/heads/ignite-1349 Commit: 75616dfc0f5d359098881b957b5c32e80721f901 Parents: 71db9d32 Author: sboikov <[email protected]> Authored: Thu Sep 3 10:46:11 2015 +0300 Committer: sboikov <[email protected]> Committed: Thu Sep 3 10:48:21 2015 +0300 ---------------------------------------------------------------------- .../processors/cache/GridCacheMvccSelfTest.java | 29 +++++++------------- 1 file changed, 10 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/75616dfc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java index c1bf2f1..f2bb8fa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java @@ -1349,14 +1349,20 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest { ctx.mvcc().addNext(ctx, c1); + ctx.mvcc().contextReset(); + GridCacheMvccCandidate c2 = entry.addLocal(2, ver2, 0, true, false); ctx.mvcc().addNext(ctx, c2); + ctx.mvcc().contextReset(); + GridCacheMvccCandidate c3 = entry.addLocal(3, ver3, 0, true, true); ctx.mvcc().addNext(ctx, c3); + ctx.mvcc().contextReset(); + checkLocal(entry.candidate(ver1), ver1, false, false, false); checkLocal(entry.candidate(ver2), ver2, false, false, false); checkLocal(entry.candidate(ver3), ver3, false, false, false); @@ -1371,9 +1377,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest { entry.removeLock(ver2); assert c3 != null; - assert c3.previous() == c2; assert c2 != null; - assert c2.previous() == c1; checkLocal(c2, ver2, false, false, false, true); @@ -1382,9 +1386,6 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest { entry.removeLock(ver1); - assert c3.previous() == c2; - assert c2.previous() == c1; - checkLocal(entry.candidate(ver3), ver3, true, true, false); GridCacheMvccCandidate c4 = entry.addLocal(4, ver4, 0, true, true); @@ -1392,7 +1393,6 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest { ctx.mvcc().addNext(ctx, c4); assert c4 != null; - assert c4.previous() == c3; } /** @@ -1624,6 +1624,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest { /** * Links candidates. * + * @param ctx Cache context. * @param cands Candidates. * @throws Exception If failed. */ @@ -1670,9 +1671,8 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest { StringBuilder buf = new StringBuilder(eol); - for (Object obj : objs) { + for (Object obj : objs) buf.append(obj.toString()).append(eol); - } return buf.toString(); } @@ -1686,9 +1686,8 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest { StringBuilder buf = new StringBuilder(eol); - for (Object obj : objs) { + for (Object obj : objs) buf.append(obj.toString()).append(eol); - } return buf.toString(); } @@ -1834,20 +1833,12 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest { } /** - * @return Empty collection. - */ - private Collection<GridCacheVersion> empty() { - return Collections.emptyList(); - } - - /** * @param cands Candidates to print. */ private void info(Iterable<GridCacheMvccCandidate> cands) { info("Collection of candidates: "); - for (GridCacheMvccCandidate c : cands) { + for (GridCacheMvccCandidate c : cands) info(">>> " + c); - } } } \ No newline at end of file
