

Public Member Functions | |
| void | testParseLogRecord () throws Exception |
| void | testFields () throws Exception |
| void | testMultipleParse () throws Exception |
| void | testSpecialLogs () throws Exception |
Private Attributes | |
| ACSLogParser | parser |
| final String | xmlLogInfo1 |
| final String | xmlLogInfo2 |
| final String | xmlLogWarningWithException |
| final String[] | specialLogs |
The class to test parsing.
The tests iterate over all possible parsers.
| void com::cosylab::logging::engine::ACS::ACSLogParserTest::testFields | ( | ) | throws Exception [inline] |
Check if the fields are read as expected
| Exception |
References alma::acs::logging::engine::parser::ACSLogParser::parse(), parser, and xmlLogInfo1.
| void com::cosylab::logging::engine::ACS::ACSLogParserTest::testMultipleParse | ( | ) | throws Exception [inline] |
Call the parser several times
| Exception |
References alma::acs::logging::engine::parser::ACSLogParser::parse(), parser, xmlLogInfo1, xmlLogInfo2, and xmlLogWarningWithException.
| void com::cosylab::logging::engine::ACS::ACSLogParserTest::testParseLogRecord | ( | ) | throws Exception [inline] |
Parses one log record from XML and verifies a few fields, including the exception details that are attached as additional data.
| Exception |
References alma::acs::logging::engine::parser::ACSLogParser::parse(), parser, and xmlLogWarningWithException.
| void com::cosylab::logging::engine::ACS::ACSLogParserTest::testSpecialLogs | ( | ) | throws Exception [inline] |
Test special logs i.e. logs that sometime have returned errors while parsing.
specialLogs | Exception |
References com::cosylab::logging::engine::log::ILogEntry::getAdditionalData(), com::cosylab::logging::engine::log::ILogEntry::getField(), com::cosylab::logging::engine::log::ILogEntry::AdditionalData::name, alma::acs::logging::engine::parser::ACSLogParser::parse(), parser, specialLogs, and com::cosylab::logging::engine::log::ILogEntry::AdditionalData::value.
Referenced by testFields(), testMultipleParse(), testParseLogRecord(), and testSpecialLogs().
final String [] com::cosylab::logging::engine::ACS::ACSLogParserTest::specialLogs [private] |
{
"<Info TimeStamp=\"2006-03-28T00:26:29.239\">" +
"<Data Name=\"Pippo\"><![CDATA[Pluto]]></Data>" +
"<Data Name=\"2ndName\"><![CDATA[2ndVal]]></Data>" +
"<![CDATA[Thread name: 'ARCHIVE_BULKSENDER::monitorThread']]>" +
"</Info>"
}
An array of special ogs i.e. logs that for one reason or another presented some problem while parsing.
Referenced by testSpecialLogs().
final String com::cosylab::logging::engine::ACS::ACSLogParserTest::xmlLogInfo1 [private] |
"<Info TimeStamp=\"2006-03-28T00:26:29.238\" File=\"maciContainerImpl.cpp\" Line=\"1454\" " +
"Routine=\"maci::ContainerImpl::initThread\" Host=\"gas\" Process=\"maciContainer\" Thread=\"ARCHIVE_BULKSENDER::actionThread\" " +
"Context=\"CTXT\" SourceObject=\"ARCHIVE_BULKSENDER::source\" Audience=\"Operator\" Array=\"AnArray\" Antenna=\"ThisIsTheAntenna\""+
" StackLevel=\"10\" StackId=\"TheStackID\" Priority=\"3\">" +
"<![CDATA[Thread name: 'ARCHIVE_BULKSENDER::actionThread']]>" +
"</Info>"
Referenced by testFields(), and testMultipleParse().
final String com::cosylab::logging::engine::ACS::ACSLogParserTest::xmlLogInfo2 [private] |
"<Info TimeStamp=\"2006-03-28T00:26:29.239\" File=\"maciContainerImpl.cpp\" Line=\"1454\" " +
"Routine=\"maci::ContainerImpl::initThread\" Host=\"gas\" Process=\"maciContainer\" Thread=\"ARCHIVE_BULKSENDER::monitorThread\" " +
"Context=\"\" SourceObject=\"ARCHIVE_BULKSENDER::monitorThread\">" +
"<![CDATA[Thread name: 'ARCHIVE_BULKSENDER::monitorThread']]>" +
"</Info>"
Referenced by testMultipleParse().
final String com::cosylab::logging::engine::ACS::ACSLogParserTest::xmlLogWarningWithException [private] |
"<Warning TimeStamp=\"2006-03-28T00:26:46.149\" " +
"File=\"alma.acs.container.ContainerSealant\" Line=\"184\" Routine=\"invoke\" Host=\"gas\" " +
"Process=\"LoggerName: alma.acs.container.ARCHIVE/ACC/javaContainer\" SourceObject=\"ARCHIVE/ACC/javaContainer\" " +
"Thread=\"RequestProcessor-15\" StackId=\"unknown\" StackLevel=\"0\" LogId=\"298\">" +
"<![CDATA[checked exception was thrown in functional method 'ARCHIVE_CONNECTION/alma.xmlstore.Operational#retrieve':]]>" +
"<Data Name=\"LoggedException\"><![CDATA[alma.xmlstore.OperationalPackage.NotFound: uid://X00000000000028aa/X00000002" + "\n" +
" at alma.archive.components.OperationalImpl.retrieve(OperationalImpl.java:450)" + "\n" +
" at alma.archive.components.OperationalImpl.retrieve(OperationalImpl.java:480)" + "\n" +
" at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)" + "\n" +
" at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)" + "\n" +
" at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)" + "\n" +
" at java.lang.reflect.Method.invoke(Method.java:585)" + "\n" +
" at alma.acs.container.ContainerSealant.invoke(ContainerSealant.java:155)" + "\n" +
" at $Proxy3.retrieve(Unknown Source)" + "\n" +
" at alma.xmlstore.OperationalPOATie.retrieve(OperationalPOATie.java:103)" + "\n" +
" at alma.xmlstore.OperationalPOA._invoke(OperationalPOA.java:316)" + "\n" +
" at org.jacorb.poa.RequestProcessor.invokeOperation(Unknown Source)" + "\n" +
" at org.jacorb.poa.RequestProcessor.process(Unknown Source)" + "\n" +
" at org.jacorb.poa.RequestProcessor.run(Unknown Source)" + "\n" +
"]]></Data><Data Name=\"Pippo\"><![CDATA[Pluto]]></Data></Warning>"
Referenced by testMultipleParse(), and testParseLogRecord().
1.6.2