]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
unit testing fix for tests/testUfs.cc
authorwessels <>
Wed, 18 Apr 2007 04:58:18 +0000 (04:58 +0000)
committerwessels <>
Wed, 18 Apr 2007 04:58:18 +0000 (04:58 +0000)
note that store_dirs_rebuilding is now initialized to 1 instead of 0

src/tests/testUfs.cc

index 59fa357ed4b11aef42548190e88a8a7f80ce7edf..bb13383bc867c382a5bd28acde66814852d50ec5 100644 (file)
@@ -119,12 +119,12 @@ testUfs::testUfsSearch()
     Store::Root().init();
 
     /* our swapdir must be scheduled to rebuild */
-    CPPUNIT_ASSERT_EQUAL(1, StoreController::store_dirs_rebuilding);
+    CPPUNIT_ASSERT_EQUAL(2, StoreController::store_dirs_rebuilding);
 
     /* rebuild is a scheduled event */
     StockEventLoop loop;
 
-    while (StoreController::store_dirs_rebuilding)
+    while (StoreController::store_dirs_rebuilding > 1)
         loop.runOnce();
 
     /* cannot use loop.run(); as the loop will never idle: the store-dir
@@ -132,7 +132,7 @@ testUfs::testUfsSearch()
      */
 
     /* nothing left to rebuild */
-    CPPUNIT_ASSERT_EQUAL(0, StoreController::store_dirs_rebuilding);
+    CPPUNIT_ASSERT_EQUAL(1, StoreController::store_dirs_rebuilding);
 
     /* add an entry */
     {