alma::acs::jlog::test::TestEngineCacheEntriesQueue Class Reference

Inheritance diagram for alma::acs::jlog::test::TestEngineCacheEntriesQueue:
Inheritance graph
[legend]
Collaboration diagram for alma::acs::jlog::test::TestEngineCacheEntriesQueue:
Collaboration graph
[legend]

List of all members.

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< CacheEntryentries = new Vector<CacheEntry>()
CacheEntriesQueue queue

Static Private Attributes

static final int TEST_ENTRIES = 100000

Detailed Description

Test the CacheEntriesQueue

Author:
acaproni

Constructor & Destructor Documentation

alma::acs::jlog::test::TestEngineCacheEntriesQueue::TestEngineCacheEntriesQueue (  )  [inline]

Constructor


Member Function Documentation

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]
void alma::acs::jlog::test::TestEngineCacheEntriesQueue::testClear (  )  throws Exception [inline]
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:

  1. add the entries in the cache
  2. check the number of entries in the queue
  3. get all the entries from the queue checking if they are the same of the pushed ones

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:

  1. add the entries in the cache
  2. check the number of entries in the queue
  3. get all the entries from the queue checking if they are the same of the pushed ones

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:

  1. add the entries in the cache
  2. check the number of entries in the queue
  3. get all the entries from the queue checking if they are the same of the pushed ones

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]

Member Data Documentation

The vector of CacheEntry sent and read from the queue

Referenced by populateEntries(), tearDown(), testClear(), testPushPopQueue(), testPushPopQueueVector(), testPushPopQueueVectorFile(), and testRandomOrder().

The number of CacheEntry for testing

Referenced by populateEntries(), testPushPopQueueVectorFile(), and testRandomOrder().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2