alma::acs::jlog::test::EngineAudienceTest Class Reference

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

List of all members.

Public Member Functions

void testSetMode () throws Exception
void testOperatorModeFiltering () throws Exception
void testNoAudienceModeFiltering () throws Exception
void xmlEntryReceived (String xmlLogString)
void logEntryReceived (ILogEntry logEntry)

Static Public Attributes

static final String logHeaderStr = " TimeStamp=\""
static final String logBodyStr = "\" Routine=\"CacheTest::testGet\" Host=\"this\" Process=\"test\" Thread=\"main\" Context=\"\" Audience=\""
static final String logEndOfBodyStr = "\"><![CDATA["
static final String logFooterStr = "]]></"

Protected Member Functions

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

Private Member Functions

boolean waitForLogs ()

Private Attributes

final int TIMEOUT = 60
ACSLogRetrieval logRetieval = null
ACSListenersDispatcher dispatcher = null
int numOfReceivedLogs
int numOfReceivedXMLLogs
Audience audience

Detailed Description

A class testing the filtering by mode performed by ACSLogretrieval. The mode is defined in log_audience ILD module.

The test is done by checking what logs ACSLogRetrieval discards i.e. the LCEngine is not used here as it is stressed by other tests. This class is the listener for the log and the XMLs that ACSLogRetrieval sends to the listeners throw the ACSListenersDispatcher.

Author:
acaproni

Member Function Documentation

void alma::acs::jlog::test::EngineAudienceTest::logEntryReceived ( ILogEntry  logEntry  )  [inline]
void alma::acs::jlog::test::EngineAudienceTest::setUp (  )  throws Exception [inline, protected]
void alma::acs::jlog::test::EngineAudienceTest::tearDown (  )  throws Exception [inline, protected]
void alma::acs::jlog::test::EngineAudienceTest::testNoAudienceModeFiltering (  )  throws Exception [inline]
void alma::acs::jlog::test::EngineAudienceTest::testOperatorModeFiltering (  )  throws Exception [inline]

Test the filtering for OPERATOR.

The logs that should not be filtered are those that:

  • have a level of WARINING or greater
  • have the audience set to OPERATOR

The test is done in 2 times: 1. a collection of logs with no audience is tested 2. a collection of logs with different values for audience is tested

Exceptions:
Exception 

References com::cosylab::logging::engine::ACS::ACSLogRetrieval::addLog(), audience, logBodyStr, logEndOfBodyStr, logFooterStr, logHeaderStr, logRetieval, numOfReceivedLogs, numOfReceivedXMLLogs, alma::acs::logging::engine::parser::ACSLogParser::parse(), com::cosylab::logging::engine::LogMatcher::setAudience(), and waitForLogs().

void alma::acs::jlog::test::EngineAudienceTest::testSetMode (  )  throws Exception [inline]
boolean alma::acs::jlog::test::EngineAudienceTest::waitForLogs (  )  [inline, private]
void alma::acs::jlog::test::EngineAudienceTest::xmlEntryReceived ( String  xmlLogString  )  [inline]

The counter numOfReceivedXMLLogs is incremented for each received log

See also:
com.cosylab.logging.engine.ACS.ACSRemoteRawLogListener::xmlEntryReceived(java.lang.String)

Implements com::cosylab::logging::engine::ACS::ACSRemoteRawLogListener.

References numOfReceivedXMLLogs.


Member Data Documentation

/ The dispatcher used by ACSLogRetrieval to send logs to the registered listeners.

Referenced by setUp(), and tearDown().

final String alma::acs::jlog::test::EngineAudienceTest::logBodyStr = "\" Routine=\"CacheTest::testGet\" Host=\"this\" Process=\"test\" Thread=\"main\" Context=\"\" Audience=\"" [static]
final String alma::acs::jlog::test::EngineAudienceTest::logEndOfBodyStr = "\"><![CDATA[" [static]
final String alma::acs::jlog::test::EngineAudienceTest::logHeaderStr = " TimeStamp=\"" [static]

The object whose filtering capabilities we want to test

Referenced by setUp(), tearDown(), testNoAudienceModeFiltering(), testOperatorModeFiltering(), testSetMode(), and waitForLogs().

The timeout (secs) to wait before giving up waiting for logs

Referenced by waitForLogs().


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

Generated by  doxygen 1.6.2