From 8e7d97fc195214bd30268edbce4e87f2e00b76af Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Thu, 8 Jul 2010 01:41:29 +0200 Subject: [PATCH] feature #192: Fix cache test for Pools with the new defaults --- src/pool/test/pool.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/pool/test/pool.cc b/src/pool/test/pool.cc index 7449cc7bde..f32f58da7d 100644 --- a/src/pool/test/pool.cc +++ b/src/pool/test/pool.cc @@ -200,7 +200,8 @@ public: TestObjectSQL *obj_lock; //pin object in the cache, it can't be removed - - for (int i=0 ; i < 499 ; i++) + //Should be set to MAX_POOL -1 + for (int i=0 ; i < 14999 ; i++) { create_allocate(i,"A Test object"); @@ -208,12 +209,12 @@ public: CPPUNIT_ASSERT(obj_lock != 0); } - for (int i=499 ; i < 2000 ; i++) + for (int i=14999 ; i < 15200 ; i++) //Works with just 1 cache line { create_allocate(i,"A Test object"); } - for (int i=499; i < 2000 ; i++) + for (int i=14999; i < 15200 ; i++) { obj = pool->get(i, true); CPPUNIT_ASSERT(obj != 0); @@ -223,9 +224,9 @@ public: obj->unlock(); } - for (int i=0 ; i < 499 ; i++) + for (int i=0 ; i < 14999 ; i++) { - obj_lock = pool->get(i, false);//pin object in the cache, it can't be removed + obj_lock = pool->get(i, false); obj_lock->unlock(); } };