Slight modifications to test cases.
git-svn-id: https://hyracks.googlecode.com/svn/branches/hyracks_storage_cleanup@261 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/btree/BTreeOperatorsTest.java b/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/btree/BTreeOperatorsTest.java
index 6d33c71..32771bf 100644
--- a/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/btree/BTreeOperatorsTest.java
+++ b/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/btree/BTreeOperatorsTest.java
@@ -73,8 +73,7 @@
public class BTreeOperatorsTest extends AbstractIntegrationTest {
- // TODO: fix bug when given fewer pages in buffer cache, talk to Vinayak
- private static HyracksSimpleStorageManagerInterface storageManager = new HyracksSimpleStorageManagerInterface(8192, 100);
+ private static HyracksSimpleStorageManagerInterface storageManager = new HyracksSimpleStorageManagerInterface(8192, 20);
@Test
public void bulkLoadTest() throws Exception {
diff --git a/hyracks-storage-am-btree/src/test/java/edu/uci/ics/hyracks/storage/am/btree/StorageManagerTest.java b/hyracks-storage-am-btree/src/test/java/edu/uci/ics/hyracks/storage/am/btree/StorageManagerTest.java
index be63c1e..f7b28e2 100644
--- a/hyracks-storage-am-btree/src/test/java/edu/uci/ics/hyracks/storage/am/btree/StorageManagerTest.java
+++ b/hyracks-storage-am-btree/src/test/java/edu/uci/ics/hyracks/storage/am/btree/StorageManagerTest.java
@@ -118,8 +118,7 @@
private void unpinRandomPage() {
int index = Math.abs(rnd.nextInt() % pinnedPages.size());
try {
- PinnedLatchedPage plPage = pinnedPages.get(index);
- System.out.println(workerId + " UNPINNING PAGE: " + plPage.pageId);
+ PinnedLatchedPage plPage = pinnedPages.get(index);
if(plPage.latch != null) {
if(plPage.latch == LatchType.LATCH_S) {
@@ -131,6 +130,8 @@
plPage.page.releaseWriteLatch();
}
}
+ System.out.println(workerId + " UNPINNING PAGE: " + plPage.pageId);
+
bufferCache.unpin(plPage.page);
pinnedPages.remove(index);
} catch (HyracksDataException e) {
@@ -226,9 +227,9 @@
bufferCache.createFile(fileName);
int fileId = fmp.lookupFileId(fileName);
- Thread worker = new Thread(new FileAccessWorker(0, bufferCache, FileAccessType.FTA_READONLY, fileId, 10, 10, 100, 10, 0));
+ Thread worker = new Thread(new FileAccessWorker(0, bufferCache, FileAccessType.FTA_UNLATCHED, fileId, 10, 10, 100, 10, 0));
- worker.start();
+ worker.start();
worker.join();