com::cosylab::logging::engine::ACS::ACSLogParserTest Class Reference

Inheritance diagram for com::cosylab::logging::engine::ACS::ACSLogParserTest:
Inheritance graph
[legend]
Collaboration diagram for com::cosylab::logging::engine::ACS::ACSLogParserTest:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

The class to test parsing.

The tests iterate over all possible parsers.

Author:
acaproni

Member Function Documentation

void com::cosylab::logging::engine::ACS::ACSLogParserTest::testFields (  )  throws Exception [inline]

Check if the fields are read as expected

Exceptions:
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

Exceptions:
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.

Exceptions:
Exception 

References alma::acs::logging::engine::parser::ACSLogParser::parse(), parser, and xmlLogWarningWithException.

void com::cosylab::logging::engine::ACS::ACSLogParserTest::testSpecialLogs (  )  throws Exception [inline]

Member Data Documentation

Initial value:
 {
                
                "<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().

Initial value:
 
                "<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().

Initial value:
 
                "<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().

Initial value:
 
                "<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().


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

Generated by  doxygen 1.6.2