ignite-db - tests wip
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/fdd09395 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/fdd09395 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/fdd09395 Branch: refs/heads/ignite-db-x-10884 Commit: fdd0939593bf65f32d8c37fce78f158adf83a78c Parents: ff88620 Author: S.Vladykin <[email protected]> Authored: Fri Apr 22 17:41:43 2016 +0300 Committer: S.Vladykin <[email protected]> Committed: Fri Apr 22 17:41:43 2016 +0300 ---------------------------------------------------------------------- .../processors/database/BPlusTreeSelfTest.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/fdd09395/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java index 4968fe8..e3919f1 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java @@ -263,6 +263,7 @@ public class BPlusTreeSelfTest extends GridCommonAbstractTest { * @throws IgniteCheckedException If failed. */ public void testRandomRemove0() throws IgniteCheckedException { + // seed: 1461177795261173000, 1461187841179332000 doTestRandomRemove(false); } @@ -270,6 +271,7 @@ public class BPlusTreeSelfTest extends GridCommonAbstractTest { * @throws IgniteCheckedException If failed. */ public void testRandomRemove1() throws IgniteCheckedException { + // seed: 1461188744119034000 1461188844311788000 1461189099834526000 doTestRandomRemove(true); } @@ -284,6 +286,8 @@ public class BPlusTreeSelfTest extends GridCommonAbstractTest { int cnt = 100_000; + int rmv = 0; + for (long x = 0; x < cnt; x++) assertEquals(map.put(x,x), tree.put(x)); @@ -292,9 +296,17 @@ public class BPlusTreeSelfTest extends GridCommonAbstractTest { Long x = (long)tree.randomInt(cnt); if (map.remove(x) != null) { +// if (rmv > 93440) { +// X.println("Rmv: " + rmv + " -> " + x); +// +// if (rmv == 93449) +// X.println(tree.printTree()); +// } + assertEquals(x, tree.remove(x)); assertNull(tree.remove(x)); + rmv++; i++; } } @@ -320,6 +332,10 @@ public class BPlusTreeSelfTest extends GridCommonAbstractTest { } } + private void doTestStagedPutRemove(boolean canGetRow) { + // TODO + } + /** * @param canGetRow Can get row from inner page. * @return Test tree instance.
