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 183 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 |
◆ CPPUNIT_TEST() [1/2]
|
private |
◆ CPPUNIT_TEST() [2/2]
|
private |
◆ CPPUNIT_TEST_SUITE()
|
private |
◆ CPPUNIT_TEST_SUITE_END()
|
private |
◆ createEntry()
|
protected |
Definition at line 168 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 198 of file testRock.cc.
References Http::METHOD_GET, storeGetPublic(), and storeId().
Referenced by testRockSwapOut().
◆ setUp()
|
override |
Definition at line 81 of file testRock.cc.
References addSwapDir(), Rock::SwapDir::create(), Store::Init(), Rock::SwapDir::parse(), rr, safe_free, ConfigParser::SetCfgLine(), store, store_maxobjsize, TESTDIR, Ipc::Mem::RegisteredRunner::useConfig(), and xstrdup.
◆ storeInit()
|
protected |
Definition at line 137 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 115 of file testRock.cc.
References SquidConfig::cacheSwap, Config, RegisteredRunner::finishShutdown(), free_cachedir(), Store::FreeMemory(), rr, store, and TESTDIR.
◆ testRockCreate()
|
protected |
Definition at line 204 of file testRock.cc.
◆ testRockSwapOut()
|
protected |
Definition at line 216 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