alma::acs::jlog::test::LogDispatcherTest Class Reference
List of all members.
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] |
| alma::acs::jlog::test::LogDispatcherTest::LogDispatcherTest |
( |
String |
str |
) |
[inline] |
Member Function Documentation
| LogBinaryRecord alma::acs::jlog::test::LogDispatcherTest::convertLogToBinary |
( |
ILogEntry |
log |
) |
throws Exception [inline, private] |
Convert a ILogEntry into a binary log
- Parameters:
-
- Returns:
- The binary log
References alma::ACSLoggingLog::LogBinaryRecord::Audience, alma::ACSLoggingLog::LogBinaryRecord::File, alma::ACSLoggingLog::LogBinaryRecord::Host, alma::ACSLoggingLog::LogBinaryRecord::Line, alma::ACSLoggingLog::LogBinaryRecord::log_data, alma::ACSLoggingLog::LogBinaryRecord::LogContext, alma::ACSLoggingLog::LogBinaryRecord::LogId, alma::ACSLoggingLog::LogBinaryRecord::MsgData, com::cosylab::logging::engine::log::ILogEntry::AdditionalData::name, alma::ACSLoggingLog::LogBinaryRecord::Priority, alma::ACSLoggingLog::LogBinaryRecord::Process, alma::ACSLoggingLog::LogBinaryRecord::Routine, alma::ACSLoggingLog::LogBinaryRecord::SourceObject, alma::ACSLoggingLog::LogBinaryRecord::StackId, alma::ACSLoggingLog::LogBinaryRecord::StackLevel, alma::ACSLoggingLog::LogBinaryRecord::Thread, alma::ACSLoggingLog::LogBinaryRecord::TimeStamp, alma::ACSLoggingLog::LogBinaryRecord::type, alma::ACSLoggingLog::LogBinaryRecord::Uri, and com::cosylab::logging::engine::log::ILogEntry::AdditionalData::value.
Referenced by toCacheString().
| void alma::acs::jlog::test::LogDispatcherTest::setUp |
( |
|
) |
throws Exception [inline, protected] |
| 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] |
Test the dispatching of binary logs
- Exceptions:
-
References com::cosylab::logging::engine::ACS::ACSLogRetrieval::addLog(), com::cosylab::logging::engine::ACS::ACSListenersDispatcher::addLogListener(), com::cosylab::logging::engine::ACS::ACSListenersDispatcher::addRawLogListener(), com::cosylab::logging::engine::ACS::ACSLogRetrieval::close(), alma::acs::util::StopWatch::getLapTimeMillis(), logRecv, logs, LOGS_NUMBER, logsReceived, rawLogsReceived, alma::acs::util::StopWatch::reset(), stopWatch, toCacheString(), and waitProcessingComplete().
| 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] |
Test the dispatching of XML logs
- Exceptions:
-
References com::cosylab::logging::engine::ACS::ACSLogRetrieval::addLog(), com::cosylab::logging::engine::ACS::ACSListenersDispatcher::addLogListener(), com::cosylab::logging::engine::ACS::ACSListenersDispatcher::addRawLogListener(), com::cosylab::logging::engine::ACS::ACSLogRetrieval::close(), alma::acs::util::StopWatch::getLapTimeMillis(), logRecv, logs, LOGS_NUMBER, logsReceived, rawLogsReceived, alma::acs::util::StopWatch::reset(), stopWatch, and waitProcessingComplete().
| 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: