

Public Member Functions | |
| EngineCacheTest () | |
| void | testPushPopSingleFile () throws Exception |
| void | testPushPopSeveralFiles () throws Exception |
| void | testCacheEntryTranslation () throws Exception |
Protected Member Functions | |
| void | setUp () throws Exception |
| void | tearDown () throws Exception |
Private Member Functions | |
| Vector< String > | generateStrings (int size) |
Private Attributes | |
| EngineCache | cache |
Static Private Attributes | |
| static final int | CACHE_SIZE = 30000 |
A class to test EngineCache.
| alma::acs::jlog::test::EngineCacheTest::EngineCacheTest | ( | ) | [inline] |
| Vector<String> alma::acs::jlog::test::EngineCacheTest::generateStrings | ( | int | size | ) | [inline, private] |
Generate the strings to put in the cache.
The number of strings to put in the vector depends by the passed parameter. The sum of the length of all the strings in the vector is equal or greater to the passed parameter. In this way it is possible to check if the cache creates/deletes a file in the right moment.
| size | The length of all the strings in the vector |
Referenced by testPushPopSeveralFiles(), and testPushPopSingleFile().
| void alma::acs::jlog::test::EngineCacheTest::setUp | ( | ) | throws Exception [inline, protected] |
| void alma::acs::jlog::test::EngineCacheTest::tearDown | ( | ) | throws Exception [inline, protected] |
References cache, and com::cosylab::logging::engine::cache::EngineCache::close().
| void alma::acs::jlog::test::EngineCacheTest::testCacheEntryTranslation | ( | ) | throws Exception [inline] |
Check the conversion in CacheEntry between the key, start and end position and their representations as an hexadecimal string.
References com::cosylab::logging::engine::cache::CacheEntry::end, com::cosylab::logging::engine::cache::CacheEntry::key, com::cosylab::logging::engine::cache::CacheEntry::start, and com::cosylab::logging::engine::cache::CacheEntry::toHexadecimal().
| void alma::acs::jlog::test::EngineCacheTest::testPushPopSeveralFiles | ( | ) | throws Exception [inline] |
Test the normal behavior of the cache by pushing and getting strings into the cache involving the creation of several files.
| Exception |
References cache, CACHE_SIZE, generateStrings(), com::cosylab::logging::engine::cache::EngineCache::getActiveFilesSize(), com::cosylab::logging::engine::cache::EngineCache::pop(), com::cosylab::logging::engine::cache::EngineCache::push(), and com::cosylab::logging::engine::cache::EngineCache::size().
| void alma::acs::jlog::test::EngineCacheTest::testPushPopSingleFile | ( | ) | throws Exception [inline] |
Test the normal behavior of the cache by pushing and getting strings into the cache without involving the creation of more then on file.
| Exception |
References cache, CACHE_SIZE, generateStrings(), com::cosylab::logging::engine::cache::EngineCache::getActiveFilesSize(), com::cosylab::logging::engine::cache::EngineCache::pop(), com::cosylab::logging::engine::cache::EngineCache::push(), and com::cosylab::logging::engine::cache::EngineCache::size().
Referenced by setUp(), tearDown(), testPushPopSeveralFiles(), and testPushPopSingleFile().
final int alma::acs::jlog::test::EngineCacheTest::CACHE_SIZE = 30000 [static, private] |
Referenced by setUp(), testPushPopSeveralFiles(), and testPushPopSingleFile().
1.6.2