From: Bryan T. <tho...@us...> - 2007-03-11 11:42:55
|
Update of /cvsroot/cweb/bigdata/src/test/com/bigdata/objndx In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv5433/src/test/com/bigdata/objndx Modified Files: TestFusedView.java TestRestartSafe.java TestCommit.java Log Message: Continued minor refactoring in line with model updates. Index: TestRestartSafe.java =================================================================== RCS file: /cvsroot/cweb/bigdata/src/test/com/bigdata/objndx/TestRestartSafe.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TestRestartSafe.java 22 Feb 2007 16:59:35 -0000 1.5 --- TestRestartSafe.java 11 Mar 2007 11:42:49 -0000 1.6 *************** *** 204,209 **** journal = reopenStore(journal); ! final BTree btree = new BTree(journal, BTreeMetadata.read(journal, ! addr1)); assertTrue(btree.dump(Level.DEBUG,System.err)); --- 204,208 ---- journal = reopenStore(journal); ! final BTree btree = BTree.load(journal, addr1); assertTrue(btree.dump(Level.DEBUG,System.err)); Index: TestCommit.java =================================================================== RCS file: /cvsroot/cweb/bigdata/src/test/com/bigdata/objndx/TestCommit.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** TestCommit.java 9 Feb 2007 16:13:18 -0000 1.12 --- TestCommit.java 11 Mar 2007 11:42:50 -0000 1.13 *************** *** 123,137 **** // Load the tree. ! BTree btree = new BTree(store, BTreeMetadata.read(store, addrMetadata), ! new HardReferenceQueue<PO>(new DefaultEvictionListener(), ! BTree.DEFAULT_HARD_REF_QUEUE_CAPACITY, ! BTree.DEFAULT_HARD_REF_QUEUE_SCAN) ! ); ! // Integer.valueOf(0), ! // null, // no comparator for primitive key type. ! // Int32OIdKeySerializer.INSTANCE, ! // SimpleEntry.Serializer.INSTANCE, ! // null // no record compressor ! // ); // verify addrRoot. --- 123,127 ---- // Load the tree. ! BTree btree = BTree.load(store, addrMetadata); // verify addrRoot. *************** *** 156,164 **** // Load the tree. ! BTree btree = new BTree(store, BTreeMetadata.read(store, ! addrMetadata), new HardReferenceQueue<PO>( ! new DefaultEvictionListener(), ! BTree.DEFAULT_HARD_REF_QUEUE_CAPACITY, ! BTree.DEFAULT_HARD_REF_QUEUE_SCAN)); // verify addrRoot. --- 146,150 ---- // Load the tree. ! BTree btree = BTree.load(store, addrMetadata); // verify addrRoot. Index: TestFusedView.java =================================================================== RCS file: /cvsroot/cweb/bigdata/src/test/com/bigdata/objndx/TestFusedView.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestFusedView.java 1 Feb 2007 21:23:29 -0000 1.1 --- TestFusedView.java 11 Mar 2007 11:42:49 -0000 1.2 *************** *** 49,53 **** /** ! * Test suite for {@link FusedView}. * * @author <a href="mailto:tho...@us...">Bryan Thompson</a> --- 49,53 ---- /** ! * Test suite for {@link ReadOnlyFusedView}. * * @author <a href="mailto:tho...@us...">Bryan Thompson</a> *************** *** 75,79 **** try { ! new FusedView(null); fail("Expecting: "+IllegalArgumentException.class); } catch(IllegalArgumentException ex) { --- 75,79 ---- try { ! new ReadOnlyFusedView(null); fail("Expecting: "+IllegalArgumentException.class); } catch(IllegalArgumentException ex) { *************** *** 82,86 **** try { ! new FusedView(new AbstractBTree[]{}); fail("Expecting: "+IllegalArgumentException.class); } catch(IllegalArgumentException ex) { --- 82,86 ---- try { ! new ReadOnlyFusedView(new AbstractBTree[]{}); fail("Expecting: "+IllegalArgumentException.class); } catch(IllegalArgumentException ex) { *************** *** 89,93 **** try { ! new FusedView(new AbstractBTree[]{btree1}); fail("Expecting: "+IllegalArgumentException.class); } catch(IllegalArgumentException ex) { --- 89,93 ---- try { ! new ReadOnlyFusedView(new AbstractBTree[]{btree1}); fail("Expecting: "+IllegalArgumentException.class); } catch(IllegalArgumentException ex) { *************** *** 96,100 **** try { ! new FusedView(new AbstractBTree[]{btree1,null}); fail("Expecting: "+IllegalArgumentException.class); } catch(IllegalArgumentException ex) { --- 96,100 ---- try { ! new ReadOnlyFusedView(new AbstractBTree[]{btree1,null}); fail("Expecting: "+IllegalArgumentException.class); } catch(IllegalArgumentException ex) { *************** *** 103,107 **** try { ! new FusedView(new AbstractBTree[]{btree1,btree1}); fail("Expecting: "+IllegalArgumentException.class); } catch(IllegalArgumentException ex) { --- 103,107 ---- try { ! new ReadOnlyFusedView(new AbstractBTree[]{btree1,btree1}); fail("Expecting: "+IllegalArgumentException.class); } catch(IllegalArgumentException ex) { *************** *** 109,113 **** } ! new FusedView(new AbstractBTree[]{btree1,btree2}); } --- 109,113 ---- } ! new ReadOnlyFusedView(new AbstractBTree[]{btree1,btree2}); } *************** *** 143,147 **** BTree btree2 = getBTree(3); ! FusedView view = new FusedView(new AbstractBTree[] { btree1, btree2 }); assertEquals(0, btree1.rangeCount(null, null)); --- 143,147 ---- BTree btree2 = getBTree(3); ! ReadOnlyFusedView view = new ReadOnlyFusedView(new AbstractBTree[] { btree1, btree2 }); assertEquals(0, btree1.rangeCount(null, null)); |