From 3c4b7f6601ee8814d9c0363592c831538cfc68fe Mon Sep 17 00:00:00 2001 From: Sears Russell Date: Fri, 9 Nov 2007 20:05:40 +0000 Subject: [PATCH] lsmTree's page lookup semantics changed so that returns the page id that a tuple would be on. The test was written assuming the user passes in a tuple that appears at the beginning of the page. --- test/stasis/check_lsmTree.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/stasis/check_lsmTree.c b/test/stasis/check_lsmTree.c index 83f04c8..9510960 100644 --- a/test/stasis/check_lsmTree.c +++ b/test/stasis/check_lsmTree.c @@ -39,12 +39,14 @@ void insertProbeIter(lsmkey_t NUM_ENTRIES) { recordid tree = TlsmCreate(xid, intcmp, TlsmRegionAlloc, &alloc_conf, sizeof(lsmkey_t)); + long oldpagenum = -1; for(lsmkey_t i = 0; i < NUM_ENTRIES; i++) { long pagenum = TlsmFindPage(xid, tree, (byte*)&i); - assert(pagenum == -1); + assert(pagenum == -1 || pagenum == oldpagenum || oldpagenum == -1); DEBUG("TlsmAppendPage %d\n",i); TlsmAppendPage(xid, tree, (const byte*)&i, TlsmRegionAlloc, &alloc_conf, i + OFFSET); pagenum = TlsmFindPage(xid, tree, (byte*)&i); + oldpagenum = pagenum; assert(pagenum == i + OFFSET); }