alma::acs::jlog::test::LogDispatcherTest Class Reference

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

List of all members.

Classes

class  Checker
class  LogsRecv

Public Member Functions

 LogDispatcherTest ()
 LogDispatcherTest (String str)
void testXMLDispatch () throws Exception
void testBinaryDispatch () throws Exception
void testGetSetDiscardLevel () throws Exception
void testDynamicDiscardLevel () throws Exception

Protected Member Functions

void setUp () throws Exception
void tearDown () throws Exception

Private Member Functions

void waitProcessingComplete (ACSLogRetrieval processor, final int timeout) throws Exception
synchronized String toCacheString (ILogEntry log) throws Exception
LogBinaryRecord convertLogToBinary (ILogEntry log) throws Exception

Private Attributes

final int LOGS_NUMBER = 50000
LogsRecv logRecv = null
Collection< ILogEntrylogs = null
StopWatch stopWatch = new StopWatch()
int logsReceived = 0
int rawLogsReceived = 0

Detailed Description

A class to test the dispatching of logs in XML and binary format. It tests the flow of the logs between they are added in the ACSLogRetrieval till the moment they are published to the listeners.

Author:
acaproni

Constructor & Destructor Documentation

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

Constructor

alma::acs::jlog::test::LogDispatcherTest::LogDispatcherTest ( String  str  )  [inline]

Constructor


Member Function Documentation

LogBinaryRecord alma::acs::jlog::test::LogDispatcherTest::convertLogToBinary ( ILogEntry  log  )  throws Exception [inline, private]
void alma::acs::jlog::test::LogDispatcherTest::setUp (  )  throws Exception [inline, protected]
See also:
junit.framework.TestCase

References logRecv, logs, LOGS_NUMBER, logsReceived, and rawLogsReceived.

void alma::acs::jlog::test::LogDispatcherTest::tearDown (  )  throws Exception [inline, protected]
See also:
junit.framework.TestCase

References logRecv, and logs.

void alma::acs::jlog::test::LogDispatcherTest::testBinaryDispatch (  )  throws Exception [inline]
void alma::acs::jlog::test::LogDispatcherTest::testDynamicDiscardLevel (  )  throws Exception [inline]
void alma::acs::jlog::test::LogDispatcherTest::testGetSetDiscardLevel (  )  throws Exception [inline]
void alma::acs::jlog::test::LogDispatcherTest::testXMLDispatch (  )  throws Exception [inline]
synchronized String alma::acs::jlog::test::LogDispatcherTest::toCacheString ( ILogEntry  log  )  throws Exception [inline, private]

Build the string for the cache out of an ILogEntry for the case of binary logs

Parameters:
log The log to get the cache string in binary format
Returns:
The cache string (binary format)

References convertLogToBinary().

Referenced by testBinaryDispatch().

void alma::acs::jlog::test::LogDispatcherTest::waitProcessingComplete ( ACSLogRetrieval  processor,
final int  timeout 
) throws Exception [inline, private]

Wait until all the logs are processed or throws an exception if the passed timeout elapsed.

Parameters:
processor The ACSLogRetrieval
timeout The timeout (sec) to wait for the entries to be consumed
Exceptions:
Exception If a timeout occurs

Referenced by testBinaryDispatch(), and testXMLDispatch().


Member Data Documentation


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

Generated by  doxygen 1.6.2