qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Wall (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (QPID-3501) LogMonitor can corrupt test logs files and cause tests subclassing AbstractLoggingTests to fail.
Date Thu, 22 Sep 2011 15:24:26 GMT

     [ https://issues.apache.org/jira/browse/QPID-3501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Keith Wall reassigned QPID-3501:
--------------------------------

    Assignee: Robbie Gemmell  (was: Keith Wall)

Hi Robbie

Can you review this commit please?  

LogMonitor has been refactored to avoid truncating the test stdout file whilst another thread
was still writing to the same file.  It was this that was causing the log file corruption
and the spurious test failures.

> LogMonitor can corrupt test logs files and cause tests subclassing AbstractLoggingTests
to fail.
> ------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3501
>                 URL: https://issues.apache.org/jira/browse/QPID-3501
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Tests
>            Reporter: Keith Wall
>            Assignee: Robbie Gemmell
>             Fix For: 0.13
>
>
> On an old slow CI box, occasionally we see test failures from those tests subclassing
AbstractLoggingTests (ChannelLoggingTests, ExchangeLoggingTest etc).
> For example:   org.apache.qpid.server.logging.ExchangeLoggingTest fails on the 0-9-1
test profile with exception:
> {code}
> TestName: testDiscardedMessage Duration: 11.167
> Incorrect message expected:<...3> but was:<...1>
>                                 
> junit.framework.ComparisonFailure: Incorrect message expected:<...3> but was:<...1>
> 	at org.apache.qpid.server.logging.AbstractTestLogging.validateMessageID(AbstractTestLogging.java:119)
> 	at org.apache.qpid.server.logging.ExchangeLoggingTest.testDiscardedMessage(ExchangeLoggingTest.java:249)
> 	at org.apache.qpid.test.utils.QpidBrokerTestCase.runBare(QpidBrokerTestCase.java:238)
> 	at org.apache.qpid.test.utils.QpidTestCase.run(QpidTestCase.java:131)
> {code}
> Analysis shows that the tests' assertions are failing because the test standard out file
is corrupt.  When the test fails, the .out file contains a long sequence of ASCII NULs and
parts of the log are duplicated.  It is the duplication that causes the assertion failure,
as the log files contain incorrect numbers of operation log messages (EXH- in this case).

>  
> {code}
> od -a TEST-org.apache.qpid.server.logging.ExchangeLoggingTest.testDiscardedMessage.out
| head
> 0000000 nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul
> *
> 0164000 nul nul nul nul nul nul nul nul nul nul nul nul m a i n
> 0164020 sp 2 0 1 1 - 0 9 - 2 1 sp 2 1 : 1
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Mime
View raw message