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

alma::acs::logging::RemoteLoggingTest Class Reference

List of all members.

Public Member Functions

void testSimpleRemoteLogging () throws Exception
void testConcurrentRemoteInitAndStop () throws InterruptedException

Protected Member Functions

void setUp () throws Exception

Private Member Functions

boolean initRemoteLogging (ClientLogManagerStandalone clm)

Detailed Description

Tests remote logging, using mock objects, and therefore does not need a running ACS which would not even exist in the strict module build order.


Member Function Documentation

boolean alma::acs::logging::RemoteLoggingTest::initRemoteLogging ClientLogManagerStandalone  clm  )  [inline, private]
 

Calls ClientLogManagerStandalone::initRemoteLogging(ORB, Manager, int, boolean)} with appropriate dummy parameters.

Parameters:
clm The instance to call initRemoteLogging on.
Returns:
true if simulated remote logging was initialized successfully

void alma::acs::logging::RemoteLoggingTest::setUp  )  throws Exception [inline, protected]
 

void alma::acs::logging::RemoteLoggingTest::testConcurrentRemoteInitAndStop  )  throws InterruptedException [inline]
 

Tests the situation in which the ClientLogManager is shut down before it has finished the asynchronous initRemoteLogging call. This can happen in a ComponentClient-based application that performs a short task.

It is important to make the stdout printing part of this test, e.g. by using TAT without output suppression tricks, because among other things we expect the string Will abort ClientLogManager::initRemoteLogging because remote logging seems no longer needed. when initRemoteLogging is interrupted by a shutdown.

The main test thread that logs some messages and the thread that calls initRemoteLogging compete for the internal lock ClientLogManager#logQueueLock, whose functioning is being tested here.

Unfortunately this cannot be totally deterministic, so we must accept occasional failures of the kind that the output contains "Remote log: <Info .../>" instead of "Will abort ..." strings, or vice versa.

void alma::acs::logging::RemoteLoggingTest::testSimpleRemoteLogging  )  throws Exception [inline]
 

Tests the simple case where logging occurs after the call to ClientLogManager#initRemoteLogging(ORB, Manager, int, boolean).


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