

Public Types | |
typedef RefCount< Rock::SwapDir > | SwapDirPointer |
Public Member Functions | |
TestRock () | |
void | setUp () override |
void | tearDown () override |
Protected Member Functions | |
void | commonInit () |
void | storeInit () |
StoreEntry * | createEntry (const int i) |
StoreEntry * | addEntry (const int i) |
StoreEntry * | getEntry (const int i) |
void | testRockCreate () |
void | testRockSwapOut () |
Private Member Functions | |
CPPUNIT_TEST_SUITE (TestRock) | |
CPPUNIT_TEST (testRockCreate) | |
CPPUNIT_TEST (testRockSwapOut) | |
CPPUNIT_TEST_SUITE_END () | |
Private Attributes | |
SwapDirPointer | store |
Rock::SwapDirRr * | rr |
Detailed Description
Definition at line 43 of file testRock.cc.
Member Typedef Documentation
◆ SwapDirPointer
Definition at line 55 of file testRock.cc.
Constructor & Destructor Documentation
◆ TestRock()
|
inline |
Definition at line 51 of file testRock.cc.
Member Function Documentation
◆ addEntry()
|
protected |
Definition at line 233 of file testRock.cc.
References StoreEntry::buffer(), StoreEntry::complete(), createEntry(), StoreEntry::flush(), MemObject::freshestReply(), StoreEntry::mem(), HttpReply::packHeadersUsingSlowPacker(), StoreEntry::swapOut(), and StoreEntry::timestampsSet().
Referenced by testRockSwapOut().
◆ commonInit()
|
protected |
Definition at line 151 of file testRock.cc.
References APP_FULLNAME, RemovalPolicySettings::args, SquidConfig::avgObjectSize, comm_init(), Config, createRemovalPolicy(), createRemovalPolicy_lru, httpHeaderInitModule(), fde::Init(), Mem::Init(), SquidConfig::maxObjectSize, mem_policy, SquidConfig::objectsPerBucket, SquidConfig::replPolicy, SquidConfig::Store, SquidConfig::store_dir_select_algorithm, storeReplAdd(), RemovalPolicySettings::type, visible_appname_string, and xstrdup.
Referenced by setUp().
◆ CPPUNIT_TEST() [1/2]
|
private |
◆ CPPUNIT_TEST() [2/2]
|
private |
◆ CPPUNIT_TEST_SUITE()
|
private |
◆ CPPUNIT_TEST_SUITE_END()
|
private |
◆ createEntry()
|
protected |
Definition at line 218 of file testRock.cc.
References MemObject::adjustableBaseReply(), RequestFlags::cachable, StoreEntry::mem(), Http::METHOD_GET, Http::scOkay, HttpReply::setHeaders(), StoreEntry::setPublicKey(), squid_curtime, storeCreateEntry(), storeId(), and SupportOrVeto::support().
Referenced by addEntry().
◆ getEntry()
|
protected |
Definition at line 248 of file testRock.cc.
References Http::METHOD_GET, storeGetPublic(), and storeId().
Referenced by testRockSwapOut().
◆ setUp()
|
override |
Definition at line 85 of file testRock.cc.
References addSwapDir(), Ipc::Mem::Segment::BasePath, commonInit(), Config, Rock::SwapDir::create(), cwd, YesNoNone::defaultTo(), Store::Init(), MAXPATHLEN, SquidConfig::memShared, Rock::SwapDir::parse(), rr, safe_free, ConfigParser::SetCfgLine(), SquidConfig::shmLocking, store, store_maxobjsize, TESTDIR, Ipc::Mem::RegisteredRunner::useConfig(), and xstrdup.
◆ storeInit()
|
protected |
Definition at line 187 of file testRock.cc.
References Store::Controller::init(), Store::Root(), EventLoop::run(), and Store::Controller::store_dirs_rebuilding.
Referenced by testRockSwapOut().
◆ tearDown()
|
override |
Definition at line 129 of file testRock.cc.
References SquidConfig::cacheSwap, Config, RegisteredRunner::finishShutdown(), free_cachedir(), Store::FreeMemory(), rr, store, and TESTDIR.
◆ testRockCreate()
|
protected |
Definition at line 254 of file testRock.cc.
◆ testRockSwapOut()
|
protected |
Definition at line 266 of file testRock.cc.
References addEntry(), Rock::SwapDir::currentCount(), MemObject::SwapOut::decision, getEntry(), StoreEntry::mem_obj, StoreEntry::release(), EventLoop::run(), store, storeInit(), StoreEntry::swap_dirn, StoreEntry::swap_filen, StoreEntry::swap_status, MemObject::swapout, SWAPOUT_DONE, SWAPOUT_NONE, SWAPOUT_WRITING, MemObject::SwapOut::swImpossible, and StoreEntry::unlock().
Member Data Documentation
◆ rr
|
private |
Definition at line 68 of file testRock.cc.
Referenced by setUp(), and tearDown().
◆ store
|
private |
Definition at line 67 of file testRock.cc.
Referenced by setUp(), tearDown(), and testRockSwapOut().
The documentation for this class was generated from the following file:
- src/tests/testRock.cc