qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Kennedy (JIRA)" <qpid-...@incubator.apache.org>
Subject [jira] Updated: (QPID-2632) Remove NullApplicationRegistry and promote InternalBrokerBaseCase for broker testing
Date Fri, 04 Jun 2010 09:24:57 GMT

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

Andrew Kennedy updated QPID-2632:

    Attachment:     (was: 0001-QPID-2632-Remove-references-to-ApplicationRegistry.patch)

> Remove NullApplicationRegistry and promote InternalBrokerBaseCase for broker testing
> ------------------------------------------------------------------------------------
>                 Key: QPID-2632
>                 URL: https://issues.apache.org/jira/browse/QPID-2632
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Tests
>            Reporter: Martin Ritchie
>            Assignee: Martin Ritchie
>         Attachments: 0001-QPID-2632-Remove-references-to-ApplicationRegistry.patch
> Current testing is often plagued with random OOM or ApplicationRegistry shutdowns at
the end of the full ant test cycle.
> Removing the old NullApplicationRegistry(NAR) that was a legacy Mock object will help
us prevent such rouge application registries hanging around and consuming memory.
> This will require a fair few changes to existing tests that assume there will be a running
ApplicationRegistry. However, in most cases it will simply be a change from using TestCase
to InternalBrokerBaseCase(IBBC). 
> The main problem with the NAR is that it sets most of the broker components to Null ...
hence the name. However, with the scale of changes to the Java broker over the last 12 months
the use of ApplicationRegistry.getInstance() as started appearting thoroughout the main broker
code base and assumptions have been made that the returned instance will be fully configured.
So no Null checks are performed.
> Removing the NAR will not be major issue as it will actually clean up the code base as
a number of test relied on to start the broker and then performed some configuration themselves.
Now they can rely on IBBC to do the heavy lifting and override the configure() method if they
need to make specifc changes to the way the broker runs. AMQQueueAlertTest is one such example.
This test requires an increase in the Alerting period. This was historically tucked in to
NAR so ALL test would run this thread every 200ms. Which in turn resulted in OOME issues during
full tests runs. The solution at the time was to exclude the extra logging via log4j.
> Now we can hae the AMQQAT simply up the alerting rate for its own purposes.
> The use of IBBC will also allow a level of test somewhere between pure unit tests and
test that use a client in systests. Tests that require a configured broker but really don't
want to have to connect a client to exercise the broker and rely on the client code returning
the right exceptions. 
> Hopefully will find some time to more fully document how we can leaverage the IBBC to
create and integrogate components of the broker during a test.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message