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
*/
/* nothing left to rebuild */
- CPPUNIT_ASSERT_EQUAL(0, StoreController::store_dirs_rebuilding);
+ CPPUNIT_ASSERT_EQUAL(1, StoreController::store_dirs_rebuilding);
/* add an entry */
{