7879808182838485868788
x = page1.getId() ; rpm.put(page1) ; page1 = null ; } blkMgr.endUpdate() ; blkMgr.beginRead() ; { RecordBufferPage page2 = rpm.getRead(x) ; assertEquals(10, get(page2, 0)) ; assertEquals(20, get(page2, 1)) ; assertEquals(30, get(page2, 2)) ;
919293949596979899100101
{ BlockMgr mgr = setup() ; write(mgr, 1234) ; write(mgr, 5678) ; mgr.beginRead() ; mgr.beginRead() ; Block b0 = mgr.getRead(0) ; Block b1 = mgr.getRead(1) ;
9293949596979899100101102
BlockMgr mgr = setup() ; write(mgr, 1234) ; write(mgr, 5678) ; mgr.beginRead() ; mgr.beginRead() ; Block b0 = mgr.getRead(0) ; Block b1 = mgr.getRead(1) ; mgr.release(b1) ;
111112113114115116117118119120121
{ BlockMgr mgr = setup() ; write(mgr, 1234) ; write(mgr, 5678) ; mgr.beginRead() ; Block b0 = mgr.getWrite(0) ; mgr.endRead() ; } @Test(expected=BlockException.class)
121122123124125126127128129130131
@Test(expected=BlockException.class) public void track_04() { BlockMgr mgr = setup() ; write(mgr, 1234) ; mgr.beginRead() ; Block b0 = mgr.getRead(0) ; mgr.promote(b0) ; mgr.endRead() ; }
131132133134135136137138139140141
@Test(expected=BlockException.class) public void track_05() { BlockMgr mgr = setup() ; mgr.beginRead() ; mgr.endUpdate() ; } @Test(expected=BlockException.class) public void track_06()