

Public Member Functions | |
| TestEngineCacheEntriesQueue () | |
| void | testPushPopQueue () throws Exception |
| void | testPushPopQueueVector () throws Exception |
| void | testPushPopQueueVectorFile () throws Exception |
| void | testClear () throws Exception |
| void | testRandomOrder () throws Exception |
Protected Member Functions | |
| void | setUp () throws Exception |
| void | tearDown () throws Exception |
Private Member Functions | |
| void | populateEntries () throws Exception |
Private Attributes | |
| Vector< CacheEntry > | entries = new Vector<CacheEntry>() |
| CacheEntriesQueue | queue |
Static Private Attributes | |
| static final int | TEST_ENTRIES = 100000 |
Test the CacheEntriesQueue
| alma::acs::jlog::test::TestEngineCacheEntriesQueue::TestEngineCacheEntriesQueue | ( | ) | [inline] |
Constructor
| void alma::acs::jlog::test::TestEngineCacheEntriesQueue::populateEntries | ( | ) | throws Exception [inline, private] |
Generate a set of TEST_ENTRIES entries in the entries vector.
References entries, and TEST_ENTRIES.
Referenced by setUp().
| void alma::acs::jlog::test::TestEngineCacheEntriesQueue::setUp | ( | ) | throws Exception [inline, protected] |
References populateEntries(), and queue.
| void alma::acs::jlog::test::TestEngineCacheEntriesQueue::tearDown | ( | ) | throws Exception [inline, protected] |
References com::cosylab::logging::engine::cache::CacheEntriesQueue::clear(), entries, and queue.
| void alma::acs::jlog::test::TestEngineCacheEntriesQueue::testClear | ( | ) | throws Exception [inline] |
Test the clearing of the queue
References com::cosylab::logging::engine::cache::CacheEntriesQueue::clear(), entries, com::cosylab::logging::engine::cache::CacheEntriesQueue::put(), queue, and com::cosylab::logging::engine::cache::CacheEntriesQueue::size().
| void alma::acs::jlog::test::TestEngineCacheEntriesQueue::testPushPopQueue | ( | ) | throws Exception [inline] |
Push and pop entries involving only the LinkedBlockingQueue (i.e non entries go in the vector, nor in the file)
Implementation note:
References com::cosylab::logging::engine::cache::CacheEntry::end, entries, com::cosylab::logging::engine::cache::CacheEntriesQueue::get(), com::cosylab::logging::engine::cache::CacheEntry::key, com::cosylab::logging::engine::cache::CacheEntriesQueue::put(), queue, com::cosylab::logging::engine::cache::CacheEntriesQueue::size(), and com::cosylab::logging::engine::cache::CacheEntry::start.
| void alma::acs::jlog::test::TestEngineCacheEntriesQueue::testPushPopQueueVector | ( | ) | throws Exception [inline] |
Push and pop entries involving the LinkedBlockingQueue and the vector but not the file
Implementation note:
References com::cosylab::logging::engine::cache::CacheEntry::end, entries, com::cosylab::logging::engine::cache::CacheEntriesQueue::get(), com::cosylab::logging::engine::cache::CacheEntry::key, com::cosylab::logging::engine::cache::CacheEntriesQueue::put(), queue, com::cosylab::logging::engine::cache::CacheEntriesQueue::size(), and com::cosylab::logging::engine::cache::CacheEntry::start.
| void alma::acs::jlog::test::TestEngineCacheEntriesQueue::testPushPopQueueVectorFile | ( | ) | throws Exception [inline] |
Push and pop entries involving the LinkedBlockingQueue, the vector and the file.
Implementation note:
The limit of this test is that entries have been sent in the queue before reading.
References com::cosylab::logging::engine::cache::CacheEntry::end, entries, com::cosylab::logging::engine::cache::CacheEntriesQueue::get(), com::cosylab::logging::engine::cache::CacheEntry::key, com::cosylab::logging::engine::cache::CacheEntriesQueue::put(), queue, com::cosylab::logging::engine::cache::CacheEntriesQueue::size(), com::cosylab::logging::engine::cache::CacheEntry::start, and TEST_ENTRIES.
| void alma::acs::jlog::test::TestEngineCacheEntriesQueue::testRandomOrder | ( | ) | throws Exception [inline] |
This test completes what is done by testPushPopQueueVectorFile but now the sequence of reading and writing operations happens randomly
| Exception |
References com::cosylab::logging::engine::cache::CacheEntry::end, entries, com::cosylab::logging::engine::cache::CacheEntriesQueue::get(), com::cosylab::logging::engine::cache::CacheEntry::key, com::cosylab::logging::engine::cache::CacheEntriesQueue::put(), queue, com::cosylab::logging::engine::cache::CacheEntriesQueue::size(), com::cosylab::logging::engine::cache::CacheEntry::start, and TEST_ENTRIES.
Vector<CacheEntry> alma::acs::jlog::test::TestEngineCacheEntriesQueue::entries = new Vector<CacheEntry>() [private] |
The vector of CacheEntry sent and read from the queue
Referenced by populateEntries(), tearDown(), testClear(), testPushPopQueue(), testPushPopQueueVector(), testPushPopQueueVectorFile(), and testRandomOrder().
The queue to test
Referenced by setUp(), tearDown(), testClear(), testPushPopQueue(), testPushPopQueueVector(), testPushPopQueueVectorFile(), and testRandomOrder().
final int alma::acs::jlog::test::TestEngineCacheEntriesQueue::TEST_ENTRIES = 100000 [static, private] |
The number of CacheEntry for testing
Referenced by populateEntries(), testPushPopQueueVectorFile(), and testRandomOrder().
1.6.2