Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

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

List of all members.

Public Member Functions

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

Static Public Attributes

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

Protected Member Functions

Override void setUp () throws Exception
Override 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
EngineAudienceHelper 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

Override void alma::acs::jlog::test::EngineAudienceTest::logEntryReceived ILogEntry  logEntry  )  [inline]
 

The counter numOfReceivedLogs is incremented for each received log. The method write a message in the stdout if the received log does not match with the audience

See also:
com.cosylab.logging.engine.ACS.ACSRemoteLogListener::logEntryReceived(com.cosylab.logging.engine.log.ILogEntry)

Override void alma::acs::jlog::test::EngineAudienceTest::setUp  )  throws Exception [inline, protected]
 

Override void alma::acs::jlog::test::EngineAudienceTest::tearDown  )  throws Exception [inline, protected]
 

void alma::acs::jlog::test::EngineAudienceTest::testNoAudienceModeFiltering  )  throws Exception [inline]
 

Test the case of NO_AUDIENCE i.e. no filtering

Exceptions:
Exception 

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 

void alma::acs::jlog::test::EngineAudienceTest::testSetMode  )  throws Exception [inline]
 

Test the setting of the mode

boolean alma::acs::jlog::test::EngineAudienceTest::waitForLogs  )  [inline, private]
 

Wait until the logRetrieval publishes all the logs

Returns:
true in case of timeout

Override 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)


Member Data Documentation

EngineAudienceHelper alma::acs::jlog::test::EngineAudienceTest::audience [private]
 

ACSListenersDispatcher alma::acs::jlog::test::EngineAudienceTest::dispatcher = null [private]
 

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

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::logFooterStr = "]]></" [static]
 

final String alma::acs::jlog::test::EngineAudienceTest::logHeaderStr = " TimeStamp=\"" [static]
 

ACSLogRetrieval alma::acs::jlog::test::EngineAudienceTest::logRetieval = null [private]
 

The object whose filtering capabilities we want to test

int alma::acs::jlog::test::EngineAudienceTest::numOfReceivedLogs [private]
 

int alma::acs::jlog::test::EngineAudienceTest::numOfReceivedXMLLogs [private]
 

final int alma::acs::jlog::test::EngineAudienceTest::TIMEOUT = 60 [private]
 

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


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:53:35 2009 for ACS Java API by doxygen 1.3.8