Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added testing section.

...

Code Block
xml
xml
titleConsumer Element for Topic configuration
        <consumer>
            <!-- The maximum depth before which the policy will be applied-->
            <maximumDepth>4235264</maximumDepth>

            <!-- The maximum message age before which the policy will be applied-->
            <maximumMessageAge>600000</maximumMessageAge>

            <!-- The maximum number of message before which the policy will be applied-->
            <maximumMessageCount>50</maximumMessageCount>

            <!-- Available Policies : Delete | Cycle -->
            <policy name="Delete">
                <options>
                    <option name="include-persistent" value="true"/>
                </options>
            </policy>
        </consumer>

Testing Spec

– Draft –

Testing for this new feature will mainly rely on system testing.

Unit Testing

Configuration changes need to be validated as part of existing Configuration Testing.

System Testing

System testing requries a number of dimensions to be varied.

  1. Protocol Version
  2. Client Ack Mode
  3. Client Consume mode
  4. Topic Durability
Protocol Version

Testing should be completed at a minimum on the two sets of protocol Protocol Version : 0-8/0-9/0-91 /and 0-10. Ideally the test would be run on each protocol version to verify the protocol exception is correctly propogated.

Client Ack Mode

The tests should be run against each client ack mode to validate if there is any difference in the exception handling. Transacted for instance should fail to commit by throwing the expected exception as well as having the exception appear on the ExceptionListener.

The NoAck
Client AckMode : Auto/Client/Dups/Transacted, NoAck - NoAck case has addition issue in that it can overwhelm IO layer in presence of a slow consumer. This should be verified however its resolution is beyond the scope of this work.

Client Consume Mode

The client can consume in one of two ways. Synchronously using receive() or asynchronously using a MessageListener.

Topic Type

Topics can be created as durable or non-durable(transient) both of these configurations should be tested as any exception should be reported in the same way. Additionally as the configuration has the ability to selectively delete durable topics this must also be tested. The required exception should be thrown when enabled but not thrown when the configuration does not control durable topics. : Async/Sync
Topic Type : Durable/Non-Durable