org.exolab.jmscts.test.message.properties.PropertyTypeTest
This class tests message property types
suite
Sets up the test suite
testObjectPropertyTypes
Verifies valid and invalid object property types.
testPropertyTypes
Verifies the supported primitive property types.
org.exolab.jmscts.test.session.ReceiverCloseTest
This class tests the behaviour of closing a session while a receiver is active.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
share
Returns if this test can share resources with other test cases. This implementation always returns false
, to ensure that a new connection is created for each test.
startConnection
Returns if the connection should be started prior to running the test. This implementation always returns false
to avoid conflicts with test cases
suite
Sets up the test suite
testSessionClose
Verifies that the receive timers for a closed session continue to advance, so receives may time out and return a null message while the session is stopped.
org.exolab.jmscts.test.session.DupsAckTest
This class tests the behaviour of consumers on sessions created with the Session.DUPS_OK_ACKNOWLEDGE
message acknowledgment mode.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-administer destinations prior to running the test case.
suite
Sets up the test suite.
testDupsOKAcknowledgement
Verifies dups ok acknowledgement functionality. Creates a consumer, send n messages, receives them, and closes the consumer. Creates another consumer and verifies that 0-n messages are be received.
org.exolab.jmscts.test.session.clientack.SubscriberRedeliveredTest
This class tests the behaviour of the JMSRedelivered flag when multiple topic subscribers subscribe to the same topic, and one of the CLIENT_ACKNOWLEDGE sessions is recovered.
checkJMSRedelivered
Verifies that the JMSRedelivered property matches that expected
getDestinations
Returns the list of destination names used by this test case. These are used to pre-administer destinations prior to running the test case.
main
The main line used to execute this test
suite
Sets up the test suite.
testJMSRedelivered
Verifies that messages received after TopicSession.recover()
have their JMSRedelivered flag set to true
, and that the same messages received via another TopicSession have their JMSRedelivered flag set to false
.
org.exolab.jmscts.stress.SendReceive0KTest
Performs a stress test using one producer, one consumer and empty messages.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
getMessagePopulator
Get the message populator. This implementation returns null
suite
Sets up the test suite
test
Performs a stress test using: - one producer
- one consumer
- one connection
- one destination
The producer and consumer run concurrently.
For CLIENT_ACKNOWLEDGE sessions, each message is acknowledged.
org.exolab.jmscts.test.selector.BooleanTest
This class tests selectors containing boolean literals.
suite
Sets up the test suite
testEquals1
Verifies that the selector true = true
selects all messages
testEquals2
Verifies that the selector true = false
selects no messages
testFalse
Verifies that the selector false
selects no messages
testFalseCase
Verifies that the selector FALSE
selects all messages
testGreaterEquals
Verifies that the selector false >= true
throws InvalidSelectorException
testGreaterThan
Verifies that the selector false > true
throws InvalidSelectorException
testLessEquals
Verifies that the selector false <= true
throws InvalidSelectorException
testLessThan
Verifies that the selector false < true
throws InvalidSelectorException
testNotEquals1
Verifies that the selector false <> true
selects all messages
testNotEquals2
Verifies that the selector false <> false
selects no messages
testTrue
Verifies that the selector true
selects all messages
testTrueCase
Verifies that the selector TrUe
selects all messages
org.exolab.jmscts.test.session.clientack.ClientAcknowledgeTest
This class tests the behaviour of sessions created with the Session.CLIENT_ACKNOWLEDGE
message acknowledgment mode.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-administer destinations prior to running the test case.
suite
Sets up the test suite.
testClientAcknowledge
Verifies client acknowledgement functionality. For each destination, send n messages, and then receive them. Acknowledge the last message received, recover the session, and verify that no other messages are received.
testPartialClientAcknowledge
Verifies client acknowledgement functionality. For each destination, send n messages, and then receive them. Acknowledge the middle message received for each destination, recover the session, and verify that the messages can be received again. The messages received after recovery should have their JMSRedelivered flag set to true.
testRecover
Verifies session recovery behaviour. For each destination, send n messages, and then receive them. Recover the session, and verify that the messages can be received again. The messages received after recovery should have their JMSRedelivered flag set to true.
org.exolab.jmscts.test.session.ListenerCloseTest
This class tests the behaviour of stopping and closing a connection while a listener is active. NOTE: Temporary destinations cannot be used as a separate connection is required to verify that the test is successful.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
share
Returns if this test can share resources with other test cases. This implementation always returns false
, to ensure that a new connection is created for each test.
startConnection
Returns if the connection should be started prior to running the test. This implementation always returns false
to avoid conflicts with test cases
suite
Sets up the test suite
testSessionClose
Verify that running MessageListeners have full access to session if the session is closed.
org.exolab.jmscts.test.session.clientack.CloseTest
This class tests the behaviour of closing sessions created with the Session.CLIENT_ACKNOWLEDGE
message acknowledgment mode.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-administer destinations prior to running the test case.
suite
Sets up the test suite.
testConnectionClose
Verifies that closing a connection does not force an acknowledgement of client-acknowledged sessions.
testSessionClose
Verifies that closing a session does not force an acknowledgement of client-acknowledged sessions.
org.exolab.jmscts.test.message.properties.PropertyConversionTest
This class tests message property conversion
checkDouble
Checks that a double property equals the expected value
checkFloat
Checks that a float property equals the expected value
expectConversionException
For each class 'A' listed in classes, converts the range of values associated with 'A' to a String property, and then verifies that the conversion to an instance of the primitive fails
expectConversionException
For each value in an array, convert them to a string, and attempt conversion using the supplied primitive's message accessor method. The operation is expected to fail.
expectException
Expect an exception when converting from one primitive type to another
suite
Sets up the test suite
testBoolean
Verifies boolean property conversion
testByte
Verifies byte property conversion
testDouble
Verifies double property conversion
testFloat
Verifies float property conversion
testInt
Verifies int property conversion
testLong
Verifies long property conversion
testNullToPrimitive
Verifies that attempting to read a null as a primitive type is equivalent to calling the primitive's corresponding valueOf(String) conversion method with a null value.
testShort
Verifies short property conversion
testStringBoolean
Verifies string <-> boolean property conversions
testStringByte
Verifies string <-> byte property conversions
testStringDouble
Verifies string <-> double property conversions
testStringFloat
Verifies string <-> float property conversions
testStringInt
Verifies string <-> int property conversions
testStringLong
Verifies string <-> long property conversions
testStringObject
Verifies string <-> object property conversions
testStringShort
Verifies string <-> short property conversions
org.exolab.jmscts.test.session.NonTransactedTest
This class verifies that methods used only for transacted sessions throw IllegalStateException
if invoked
suite
Sets up the test suite
testCommit
Verifies that an IllegalStateException is thrown if Session.commit() is invoked for a non-transacted sesssion
testRollback
Verifies that an IllegalStateException is thrown if Session.rollback() is invoked for a non-transacted sesssion
org.exolab.jmscts.test.message.readwrite.ReadWriteTest
This class tests that message properties and message bodies may be read and written on creation of a new message
checkBytesStreamReadableOnCreation
Verifies that attempting to read a BytesMessage or StreamMessage on creation MessageNotReadableException
, until reset()
is invoked, and that subsequent reads throw MessageEOFException
getMessagePopulator
Get the message populator. This implementation always returns null
suite
Sets up the test suite
testBytesReadableOnCreation
Verifies that attempting to read a BytesMessage on creation throws MessageNotReadableException
, until BytesMessage.reset()
is invoked, and that subsequent reads throw MessageEOFException
testReadableOnCreation
Verifies that a message is readable on creation.
testStreamReadableOnCreation
Verifies that attempting to read a StreamMessage on creation throws MessageNotReadableException
, until StreamMessage.reset()
is invoked, and that subsequent reads throw MessageEOFException
testWriteableOnClear
Verifies that a message is writeable after clearing its body.
testWriteableOnCreation
Verifies that a message is writable on creation.
org.exolab.jmscts.test.message.clear.RecoverClearTest
This class tests the behaviour of Message.clearBody()
and Message.clearProperties()
for CLIENT_ACKNOWLEDGE sessions where the session is recovered.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
suite
Sets up the test suite
testRecover
Verifies that clearing the properties and bodies of received messages doesn't affect the messages received after recovering the session
verify
Receive messages, and verify them
org.exolab.jmscts.test.connection.ReceiverTest
This class tests the behaviour of stopping and closing a connection while a receiver is active.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
share
Returns if this test can share resources with other test cases. This implementation always returns false
, to ensure that a new connection is created for each test.
startConnection
Returns if the connection should be started prior to running the test. This implementation always returns false
to avoid conflicts with test cases
suite
Sets up the test suite
testConnectionClose
Verifies that the receive timers for a closed connection continue to advance, so receives may time out and return a null message as the connection is closed.
testConnectionRestart
Verifies that the receive timers for a stopped connection continue to advance, so that when the connection is stopped, a waiting receiver can subsequently receive a message when the connection is started again
testConnectionStop
Verifies that the receive timers for a stopped connection continue to advance, so receives may time out and return a null message while the connection is stopped.
org.exolab.jmscts.test.connection.AuthTest
This class tests connection authorisation
suite
Sets up the test suite
testInvalidQueueAuth
Verifies that a QueueConnection cannot be created, when using an invalid username and password
testInvalidTopicAuth
Verifies that a TopicConnection cannot be created, when using an invalid username and password
testQueueAuth
Verifies that a QueueConnection can be created, using a valid username and password
testTopicAuth
Verifies that a TopicConnection can be created, using a valid username and password
org.exolab.jmscts.test.topic.DuplicateDurableSubscriberTest
This class tests the behaviour of durable TopicSubscribers
suite
Sets up the test suite
testDuplicateSubscriber
Verifies that creating a duplicate subscriber in a different session but same connection throws JMSException
testDuplicateSubscriberPerSession
Verifies that creating a duplicate durable subscriber in the same session throws JMSException
org.exolab.jmscts.stress.SendReceive2Size0KTest
Performs a stress test using one producer, two consumers and empty messages.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
getMessagePopulator
Get the message populator. This implementation returns null
suite
Sets up the test suite
test
Performs a stress test using: - one producer
- two consumers
- one connection
- one destination
The producer and consumers run concurrently.
For CLIENT_ACKNOWLEDGE sessions, each message is acknowledged.
org.exolab.jmscts.test.message.readwrite.SendReceiveReadWriteTest
This class tests that message properties and message bodies are writeable on send, and readable on receipt
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
getMessagePopulator
Get the message populator. This implementation always returns null
suite
Sets up the test suite
testReadOnlyOnReceipt
Verifies that a message's user properties and body are read-only on receipt, and that they may be subsequently cleared.
testWriteableOnSend
Verifies that the same message may be populated and sent more than once.
org.exolab.jmscts.stress.SendReceive50Size0KTest
Performs a stress test using one producer, fifty consumers and empty messages.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
getMessagePopulator
Get the message populator. This implementation returns null
suite
Sets up the test suite
test
Performs a stress test using: - one producer
- fifty consumers
- one connection
- one destination
The producer and consumers run concurrently.
For CLIENT_ACKNOWLEDGE sessions, each message is acknowledged.
org.exolab.jmscts.test.message.stream.StreamMessageTest
This class tests the StreamMessage
message type
getMessagePopulator
Get the message populator. This implementation always returns null
populateByteArray
Helper to return a byte array of the specified length, populated with an incrementing sequence of values
read
Read an object of the specified type
readNull
Attempt to read a null
as a particular type
suite
Sets up the test suite
testConversion
Verifies valid conversions for all types except String (this is handled by testStringConversion()).
testFullReadBytes
Verifies that readBytes can read an entire byte array, and returns -1 on the subsequent call.
testIncrementalReadBytes
Verifies that readBytes can read be invoked incrementally.
testInvalidNumericConversion
Verifies invalid string to numeric conversions.
testInvalidObject
Verifies that an invalid object being written using the writeObject() method throws MessageFormatException
testNull
Verifies null conversions.
testPartialReadBytes
Verifies that invoking any read method when a partial byte array has been read throws MessageFormatException
.
testReadBytesClearBody1
Verifies that invoking readBytes() followed by clearBody() followed by readBytes() returns the expected result, when the first readBytes() call has not completed reading the array field. This verifies that clearBody() correctly clears the state of the message.
testReadBytesClearBody2
Verifies that invoking readBytes() followed by clearBody() followed by readObject() returns the expected result, when the readBytes() call has not completed reading the array field. This ensures that clearBody() correctly clears the state of the message.
testReadBytesReset1
Verifies that invoking readBytes() followed by reset() followed by readBytes() returns the expected result, when the first readBytes() call has not completed reading the array field. This verifies that reset() correctly resets the state of the message.
testReadBytesReset2
Verifies that invoking readBytes() followed by reset() followed by readObject() returns the expected result, when the readBytes() call has not completed reading the array field. This verifies that reset() correctly resets the state of the message.
testReadFailure
Verifies that if a read method throws MessageFormatException the current position of the read pointer is not incremented, and that a subsequent read is capable of recovering from the exception by re-reading the data as a different type.
testReadWriteBytes
Verifies that readBytes returns that written by the writeBytes methods.
testStringConversion
Verifies valid string conversions.
testWriteBytes
Verifies that invoking writeBytes does not modify the source array
testWriteObject
Verifies that writeObject() can handle all supported types
write
Write an object using the appropriate write<Object>() method
org.exolab.jmscts.test.connection.ClientIdentifierTest
This class verifies that the client identifier can be set, but only on creation of a connection.
expectFailure
Expect the setClientID operation to fail
startConnection
Returns true if the connection should be started prior to running the test. This implementation returns false, as it would affect the behaviour of {@link #testSetOnCreation}
suite
Sets up the test suite
testDuplicateClientID
Verifies that two connections may not have the same client identifier
testSetAfterClose
Verifies that the client identifier cannot be set on a closed connection
testSetAfterCreateSession
Verifies that the client identifier cannot be set after a session has been created
testSetAfterListenerRegistration
Verifies that the client identifier cannot be set after an exception listener has been registered
testSetAfterStart
Verifies that the client identifier cannot be set after the connection has been started
testSetAfterStop
Verifies that the client identifier cannot be set after the connection has stopped
testSetOnCreation
Verifies that the client identifier can be set on a connection, just after it is created, but not subsequently.
org.exolab.jmscts.test.message.copy.MapMessageTest
This class tests that MapMessage
copies byte array content
getMessagePopulator
Get the message populator. This implementation always returns null
suite
Sets up the test suite
testByteArrayCopy
Verifies that MapMessage.setObject()
copies byte arrays
testPartialSetBytesCopy
Verifies that MapMessage.setBytes(byte[], int, int)
takes a copy of the byte array.
testSetBytesCopy
Verifies that MapMessage.setBytes(byte[])
takes a copy of the byte array.
org.exolab.jmscts.test.asf.ConnectionConsumerTest
This class tests the behaviour of ConnectionConsumer
s
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
suite
Sets up the test suite
test
Verifies that a ConnectionConsumer
can be created
org.exolab.jmscts.test.message.clear.RollbackClearTest
This class tests the behaviour of Message.clearBody()
and Message.clearProperties()
for transacted sessions where the session is rolled back.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
suite
Sets up the test suite
testRollback
Verifies that clearing the properties and bodies of received messages doesn't affect the messages received after rolling back the session
verify
Receive messages, and verify them
org.exolab.jmscts.test.session.MessageListenerTest
This class tests that MessageListeners are invoked serially.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-administer destinations prior to running the test case.
suite
Sets up the test suite.
testSerialInvocation
Verifies that message listeners are invoked serially.
org.exolab.jmscts.test.message.header.JMSDestinationTest
This class tests the JMSDestination message property
getDestinations
Returns the list of destination names used by this test case. These are used to pre-administer destinations prior to running the test case.
suite
Sets up the test suite
testJMSDestination
Verifies that the JMSDestination is assigned when a message is sent, and that the received message has the same JMSDestination value as that sent
testJMSDestinationOnResend
Verifies that the JMSDestination is assigned when a message is resent to a different destination
org.exolab.jmscts.test.connection.StopStartTest
This class tests the behaviour of Connection.stop
and Connection.start
share
Returns if this test can share resources with other test cases. This implementation always returns false
, to ensure that a new connection is created for each test.
startConnection
Returns if the connection should be started prior to running the test. This implementation always returns false
to avoid conflicts with test cases
suite
Sets up the test suite
testStartForStartedConnection
Verifies that invoking Connection.start()
for a started connection has no effect.
testStopForStoppedConnection
Verifies that invoking Connection.stop()
for a stopped connection has no effect.
org.exolab.jmscts.test.session.transacted.CommitTest
This class tests session commit functionality
getDestinations
Returns the list of destination names used by this test case. These are used to pre-administer destinations prior to running the test case.
suite
Sets up the test suite.
testCommit
Verifies session commit behaviour
testCommitForClosedEndpoint
Verifies that messages are sent on commit even if their producer has been closed, and that consumed messages are acknowledged even if the consumer that received them has been closed prior to commit
org.exolab.jmscts.test.connection.ConnectionCloseTest
This class tests the behaviour of Connection.close
share
Returns if this test can share resources with other test cases. This implementation always returns false
, to ensure that a new connection is created for each test.
suite
Sets up the test suite
testCloseForClosedConnection
Verifies that closing a closed connection does not produce an exception.
testExceptionOnClose
Verifies that a IllegalStateException is thrown for any Connection method (except Connection.close()), if the connection has been closed
org.exolab.jmscts.test.message.object.ObjectMessageTest
This class tests the ObjectMessage
message type
getMessagePopulator
Get the message populator. This implementation always returns null
suite
Sets up the test suite
testNull
Verifies that ObjectMessage supports nulls
org.exolab.jmscts.test.producer.ttl.TopicPublisherTest
This class tests the behaviour of the time-to-live methods and their affect on the JMSExpiration, for TopicPublisher
s
getDestinations
Returns the list of destination names used by this test case. These are used to pre-administer destinations prior to running the test case.
suite
Sets up the test suite
testDefaultTTL
Verifies that the default time-to-live for a publisher equals 0
, and that the JMSExpiration property is set to 0
on send and receive when the default time-to-live is used.
testDefaultTTLForAnonTopic
Verifies that the default time-to-live for a publisher constructed with no destination equals 0
, and that the JMSExpiration property is set to 0
on send and receive when the default time-to-live is used.
testPublishWithTTL
Verifies that the time-to-live set at publication is used when a message is sent, and that the JMSExpiration property on the received message equals that sent.
testPublishWithTTLAndAnonTopic
Verifies that the time-to-live set at publication is used when a message is sent, using a TopicPublisher created with no default topic, and that the JMSExpiration property on the received message equals that sent.
testSetTTL
Verifies that the time-to-live can be set on a publisher, that the value is used when no time-to-live is provided when a message is sent, and that the JMSExpiration property on the received message equals that sent.
testSetTTLWithAnonTopic
Verifies that the time-to-live can be set on a publisher created with no default topic, that the value is used when no time-to-live is provided when a message is sent, and that the JMSExpiration property on the received message equals that sent.
verifyPublish
Publishes a message using the TopicPublisher.publish(Message) method and verifies that the JMSExpiration property is set correctly on publish, and is the same on receipt
verifyPublishWithTopic
Publishes a message using the TopicPublisher.publish(Topic, Message) method and verifies that the JMSExpiration property is set correctly
org.exolab.jmscts.test.session.transacted.RollbackTest
This class tests session rollback functionality.
checkRedelivered
Helper to compare the JMSRedelivered property of a list of messages against that expected
getDestinations
Returns the list of destination names used by this test case. These are used to pre-administer destinations prior to running the test case.
suite
Sets up the test suite.
testClose
Verifies that calling Session.rollback()
for a closed session throws IllegalStateException
testRollback
Verifies session rollback behaviour
org.exolab.jmscts.stress.Send0KTest
Performs a stress test using one producer and empty messages.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
getMessagePopulator
Get the message populator. This implementation returns null
shouldCreateMessage
Determines if messages should be pre-created and populated for the test.
suite
Sets up the test suite
test
Performs a stress test using: - a single producer
- a single destination
- empty messages
org.exolab.jmscts.test.message.copy.MessageCopyTest
This class tests that message properties and message bodies are copied on send and receive.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
getMessagePopulator
Get the message populator. This implementation always returns null
suite
Sets up the test suite
testCopyOnSend
Verifies that messages are copied by the provider on send.
org.exolab.jmscts.test.producer.ttl.QueueSenderTest
This class tests the behaviour of the time-to-live methods and their affect on the JMSExpiration, for QueueSender
s
getDestinations
Returns the list of destination names used by this test case. These are used to pre-administer destinations prior to running the test case.
suite
Sets up the test suite
testDefaultTTL
Verifies that the default time-to-live for a sender equals 0
, and that the JMSExpiration property is set to 0
on send and receive when the default time-to-live is used.
testDefaultTTLForAnonQueue
Verifies that the default time-to-live for a sender constructed with no destination equals 0
, and that the JMSExpiration property is set to 0
on send and receive when the default time-to-live is used.
testSendWithTTL
Verifies that the time-to-live set at send is used when a message is sent, and that the JMSExpiration property on the received message equals that sent
testSendWithTTLAndAnonQueue
Verifies that the time-to-live set at send is used when a message is sent, using a QueueSender created with no default queue, and that the JMSExpiration property on the received message equals that sent
testSetTTL
Verifies that the time-to-live can be set on a sender, that the value is used when no time-to-live is provided when a message is sent, and that the JMSExpiration message property is set correctly on send and receive
testSetTTLWithAnonQueue
Verifies that the time-to-live can be set on a sender created with no default queue, that the value is used when no time-to-live is provided when a message is sent, and that the JMSExpiration property on the received message equals that sent
verifySend
Sendes a message using the QueueSender.send(Message) method and verifies that the JMSExpiration property is set correctly on send, and is the same on receipt
verifySendWithQueue
Sendes a message using the QueueSender.send(Queue, Message) method and verifies that the JMSExpiration property is set correctly
org.exolab.jmscts.test.session.CloseTest
This class tests the behaviour of Session.close
invokeSessionMethods
Invoke session methods
share
Returns if this test can share resources with other test cases. This implementation always returns false
, to ensure that a new session is created for each test.
suite
Sets up the test suite
testCloseForClosedSession
Verifies that closing a closed session has no effect.
testExceptionOnClose
Verifies that IllegalStateException is thrown for any Session method (except Session.close()) when invoking methods on a closed session.
org.exolab.jmscts.test.session.transacted.RecoverTest
This class verifies that methods used only for transacted sessions throw IllegalStateException
if invoked
suite
Sets up the test suite
testRecover
Verifies that an IllegalStateException is thrown if Session.recover() is invoked for a transacted sesssion
org.exolab.jmscts.test.message.map.MapMessageTest
This class tests the MapMessage
message type.
checkEmpty
Verifies that a getMapNames() returns an empty Enumeration for an empty message
compare
Compares two objects, failing if they are not the same
get
Helper to get a message property, invoking the appropriate get() method based on the type of the property
getMessagePopulator
Get the message populator. This implementation always returns null
getNull
Helper to attempt to convert a null property
populate
Populates a message with values
set
Helper to set a message property, invoking the appropriate set() method based on the type of the property
suite
Sets up the test suite
testCase
Verifies that field names are case sensitive NOTE: this is not explicitly mentioned in the specification, but is in keeping with property name requirements
testConversion
Verifies valid conversions for all types except String (this is handled by testStringConversion()).
testGetMapNames
Verifies that getMapNames() returns a name for each element in the set
testInvalidConversion
Verifies that attempting to perform invalid invalid conversions throws MessageFormatException.
testInvalidNumericConversion
Verifies that attempting to perform invalid invalid string to numeric conversions throws NumberFormatException
testInvalidObject
Verifies that attempting to set an invalid object using the setObject() method throws MessageFormatException
testItemExists
Verifies the behaviour of the itemExists() method
testMap
Verifies that elements populated in a map are identical to those retrieved
testNullConversion
Verifies behaviour of conversions from null
testSetObject
Verifies that setObject() can handle all supported types
testStringConversion
Verifies valid string conversions
testUnset
Verifies that getting a MapMessage field for a field name that has not been set is handled as if the field exists with a null value.
org.exolab.jmscts.test.message.properties.IdentifierTest
This class tests message property identifiers.
checkIdentifiers
Check that a list of identifiers can/can't be used as property names
expectFailure
Expect the set property methods to fail for an invalid identifier
expectSuccess
Expect the set property methods to succeed for a valid identifier
suite
Sets up the test suite
testIdentifierCase
Verifies that property names are case sensitive
testInvalidIdentifiers
Verifies that invalid identifiers can't be used as property names
testJMSXProviderIdentifiers
Tests that JMSX prefixed identifiers set by the provider cannot be set by clients. This should only apply to those identifiers that the provider supports
testReservedWords
Verifies that using a reserved word as a property name throws an exception.
testValidIdentifiers
Verifies that valid identifiers may be used as property names
toLowerCase
Returns a lowercase version of an array of Strings
org.exolab.jmscts.test.message.header.JMSReplyToTest
This class tests the JMSReplyTo message property.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-administer destinations prior to running the test case.
suite
Sets up the test suite
testReplyTo
Verifies that the reply-to address on a received message can be used to send and subsequently receive a message.
org.exolab.jmscts.test.session.AutoAckTest
This class tests the behaviour of consumers on sessions created with the Session.AUTO_ACKNOWLEDGE
message acknowledgment mode.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-administer destinations prior to running the test case.
suite
Sets up the test suite.
testAutoAcknowledgement
Verifies auto acknowledgement functionality. Creates a consumer, send n messages, receives them, and closes the consumer. Creates another consumer and verifies that no messages can be received.
org.exolab.jmscts.test.message.clear.ClearTest
This class tests the behaviour of Message.clearBody()
and Message.clearProperties()
checkClearBody
Verifies that Message.clearBody()
leaves the message body empty, and doesn't clear the message properties.
checkClearBodyOnCreation
Verifies that Message.clearBody()
can be invoked for a new message.
getMessagePopulator
Get the message populator. This implementation always returns null
suite
Sets up the test suite
testBytesClearBody
Verifies that BytesMessage.clearBody()
leaves the message body empty, and doesn't clear the message properties.
testBytesClearBodyOnCreation
Verifies that BytesMessage.clearBody()
can be invoked for a new message
testClearBody
Verifies that Message.clearBody()
leaves the message body empty, and doesn't clear the message properties.
testClearBodyOnCreation
Verifies that Message.clearBody()
can be invoked for a new message.
testClearProperties
Verifies that Message.clearProperties()
leaves the message properties empty, and doesn't clear the message body.
testClearPropertiesOnCreation
Verifies that Message.clearProperties()
can be invoked for a new message.
testStreamClearBody
Verifies that StreamMessage.clearBody()
leaves the message body empty, and doesn't clear the message properties.
testStreamClearBodyOnCreation
Verifies that StreamMessage.clearBody()
can be invoked for a new message
org.exolab.jmscts.test.message.header.JMSMessageIDTest
This class tests the JMSMessageID message property
getDestinations
Returns the list of destination names used by this test case. These are used to pre-administer destinations prior to running the test case.
suite
Sets up the test suite
testJMSMessageID
Verifies that the JMSMessageID is assigned when a message is sent, that the received message has the same JMSMessageID value, as that sent, and that a new JMSMessageID is assigned when the message is resent
testJMSMessageIDAssignment
Verifies that the JMSMessageID is assigned each time a message is sent
testJMSMessageIDPrefix
Verifies that JMSMessageID is prefixed with 'ID:'
org.exolab.jmscts.test.message.header.JMSCorrelationIDTest
This class tests the JMSCorrelationID message property
getDestinations
Returns the list of destination names used by this test case. These are used to pre-administer destinations prior to running the test case.
suite
Sets up the test suite
testCorrelationID
Verifies that the JMSCorrelationID header property can be set, and that the received message has the same JMSCorrelationID value as that sent
testCorrelationIDAsBytes
Verifies the behaviour of the JMSCorrelationIDAsBytes methods.
testNullCorrelationID
Verifies that a null can be assigned to JMSCorrelationID when: - a message is intially constructed
- a message is received with a non-null JMSCorrelationID
org.exolab.jmscts.test.message.copy.BytesMessageTest
This class tests that BytesMessage
copies content
getMessagePopulator
Get the message populator. This implementation always returns null
suite
Sets up the test suite
testPartialWriteBytesCopy
Verifies that BytesMessage.writeBytes(byte[], int, int)
takes a copy of the byte array.
testWriteBytesCopy
Verifies that BytesMessage.writeBytes(byte[])
takes a copy of the byte array.
org.exolab.jmscts.test.connection.SendReceiveStopTest
This class tests the behaviour of Connection.stop
and Connection.start
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
share
Returns if this test can share resources with other test cases. This implementation always returns false
, to ensure that a new connection is created for each test.
startConnection
Returns if the connection should be started prior to running the test. This implementation always returns false
to avoid conflicts with test cases
suite
Sets up the test suite
testStop
Verifies that a connection doesn't receive any messages after starting a connection, sending messages, and then stopping it.
testStoppedOnCreation
Verifies that a connection does not receive any messages on creation.
org.exolab.jmscts.test.connection.MetaDataTest
This class tests that connections support JMSXGroupID and JMSXGroupSeq properties.
suite
Sets up the test suite
testMetaData
Verifies that the connection supports JMSXGroupID and JMSXGroupSeq properties.
org.exolab.jmscts.test.message.close.CloseTest
This class tests the behaviour of messages when the associated connection or session is closed.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
getMessagePopulator
Get the message populator. This implementation always returns null
share
Returns if this test can share resources with other test cases. This implementation always returns false
, to ensure that a new session is created for each test.
suite
Sets up the test suite
testCloseConnection
Verifies that all the methods for a message may be invoked for a closed connection, with the exception of Message.acknowledge()
, which should throw IllegalStateException
.
testCloseSession
Verifies that all the methods for a message may be invoked for a closed session, with the exception of Message.acknowledge()
, which should throw IllegalStateException
.
org.exolab.jmscts.test.message.bytes.BytesMessageTest
This class tests the BytesMessage
message type.
checkEndOfStream1
Helper to test that readBytes(byte[]) returns -1 to indicate end-of-stream
checkEndOfStream2
Helper to test that readBytes(byte[], int) returns -1 to indicate end-of-stream
checkReadBytes1
Helper to invoke readBytes(byte[]) and verify that the result equals that expected
checkReadBytes2
Helper to invoke readBytes(byte[], int)
getMessagePopulator
Get the message populator. This implementation always returns null
populateByteArray
Helper to return a byte array of the specified length, populated with an incrementing sequence of values
suite
Sets up the test suite
testInvalidObject
Verifies that attempting to write an invalid object using the BytesMessage.writeObject() method throws MessageFormatException
testPartialReadBytes1
Verifies that the BytesMessage.readBytes(byte[], int) method can be called multiple times passing a byte array less than the length of the byte stream, and that the result matches that expected.
testPartialReadBytes2
Verifies that the BytesMessage.readBytes(byte[], int) method can be called multiple times passing a length parameter less than the length of the array, and that the result matches that expected.
testReadBytes
Verifies the behaviour of the BytesMessage.readBytes(byte[]) method.
testReadBytesForEmptyStream1
Verifies that the BytesMessage.readBytes(byte[]) method returns -1 to indicate end-of-stream, for an empty message body.
testReadBytesForEmptyStream2
Verifies that the BytesMessage.readBytes(byte[], int) method returns -1 to indicate end-of-stream, for an empty message body.
testReadBytesIndexException
Verifies that the BytesMessage.readBytes(byte[], int) method throws IndexOutOfBoundsException for invalid length parameters
testReadFailure
Verifies that if a read method throws MessageFormatException or NumberFormatException, the current position of the read pointer is not be incremented, and that a subsequent read is capable of recovering from the exception by re-reading the data as a different type.
NOTE: With the exception of the readUTF() method, it is difficult to conceive test cases for read methods. - A provider that implements BytesMessage using a DataInputStream or equivalent, is likely to only throw MessageFormatException for the readUTF() method.
The other likely exceptions are MessageEOFException for stream overruns, and JMSException for any other error. - As BytesMessage does not support conversion, NumberFormatException is unlikely to be thrown.
testWriteObject
Verfies that all objectified primitives can be written using the BytesMessage.writeObject() method
org.exolab.jmscts.test.connection.ListenerTest
This class tests the behaviour of stopping and closing a connection while a listener is active. NOTE: Temporary destinations cannot be used as a separate connection is required to verify that the test is successful.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
runTest
Run the test
share
Returns if this test can share resources with other test cases. This implementation always returns false
, to ensure that a new connection is created for each test.
startConnection
Returns if the connection should be started prior to running the test. This implementation always returns false
to avoid conflicts with test cases
suite
Sets up the test suite
testConnectionClose
Verifies that running MessageListeners have full access to connection if the connection is closed - the close invocation must wait until they complete.
testConnectionStop
Verifies that running MessageListeners have full access to the connection, if the connection is stopped.
org.exolab.jmscts.test.message.properties.PropertyTest
This class tests that message properties set before a message is sent are identical to those received.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
suite
Sets up the test suite
testPropertyIntegrity
Verifies that user properties are not modified when a message is sent and subsequently received.
testPropertyNames
Verifies that JMS standard header fields are not returned by getPropertyNames().
org.exolab.jmscts.test.selector.JMSTimestampTest
This class tests selectors containing JMSTimestamp
suite
Sets up the test suite
testInvalid1
Verifies that the selector JMSTimestamp >= '0'
throws InvalidSelectorException
testInvalid2
Verifies that the selector '0' <= JMSTimestamp
throws InvalidSelectorException
testInvalid3
Verifies that the selector JMSTimestamp = '2001/1/1 0:0'
throws InvalidSelectorException
testJMSTimestamp1
Verifies that the selector JMSTimestamp >= 0
selects all messages
testJMSTimestamp2
Verifies that the selector JMSTimestamp >= {time}
selects all messages, where {time} is a literal value derived from System.currentTimeMillis()
testJMSTimestamp3
Verifies that the selector JMSTimestamp < {time}
selects no messages, where {time} is a literal value derived from System.currentTimeMillis()
org.exolab.jmscts.test.selector.JMSDeliveryModeTest
This class tests selectors containing JMSDeliveryMode
suite
Sets up the test suite
testInvalid1
Verifies that the selector JMSDeliveryMode = {non-persistent} or JMSDeliveryMode = {persistent}
throws InvalidSelectorException, where {non-persistent} and {persistent} are the values of DeliveryMode.NON_PERSISTENT
and DeliveryMode.PERSISTENT
respectively
testInvalid2
Verifies that the selector JMSDeliveryMode = 'non_persistent'
throws InvalidSelectorException.
testJMSDeliveryMode
Verifies that messages can be selected on JMSDeliveryMode, using the selector JMSDeliveryMode = 'PERSISTENT' or JMSDeliveryMode = 'NON_PERSISTENT'
. This should select all messages
org.exolab.jmscts.test.selector.AndOperatorTest
This class tests selectors containing the AND operator.
suite
Sets up the test suite
testAnd1
Verifies that the selector true and true
selects all messages
testAnd2
Verifies that the selector true and false
selects no messages
testAnd3
Verifies that the selector false and true
selects no messages
testAnd4
Verifies that the selector false and false
selects no messages
testAndCase
Verifies that the selector true AND true
selects all messages
testInvalidAnd1
Verifies that the selector and
throws InvalidSelectorException
testInvalidAnd2
Verifies that the selector true and
throws InvalidSelectorException
testInvalidAnd3
Verifies that the selector false and
throws InvalidSelectorException
testUnsetProperty1
Verifies that the selector true and dummy
selects no messages, for the unset property 'dummy'
testUnsetProperty2
Verifies that the selector false and dummy
selects no messages, for the unset property 'dummy'
testUnsetProperty3
Verifies that the selector dummy and true
selects no messages, for the unset property 'dummy'
testUnsetProperty4
Verifies that the selector dummy and false
selects no messages, for the unset property 'dummy'
testUnsetProperty5
Verifies that the selector dummy and dummy
selects no messages, for the unset property 'dummy'
org.exolab.jmscts.test.session.clientack.RepublishTest
This class tests the behaviour of republishing a received message, and then acknowledging it.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
suite
Sets up the test suite
testRepublish
Verify the behaviour of republishing a received message, and then acknowledging it.
org.exolab.jmscts.test.selector.FloatTest
This class tests selectors containing floating point literals and objects.
suite
Sets up the test suite
testDivisionByZero
Verifies that the selector 10 / zero = 10 / zero
selects all messages, when the double property 'zero' is set, with value 0.0
testDoubleNaN1
Verifies that the selector doubleNaN = doubleNaN
selects no messages, when the double property 'doubleNaN' is set, with value Double.NaN
(as NaN != NaN)
testDoubleNaN2
Verifies that the selector doubleNaN <> doubleNaN
selects all messages, when the double property 'doubleNaN' is set, with value Double.NaN
testEquals1
Verifies that the selector 0.0 = 0.0
selects all messages
testEquals2
Verifies that the selector 0.0 = 1.0
selects no messages
testEquals3
Verifies that the selector 0.2 = 0.2
selects all messages
testEquals4
Verifies that the selector 0.2 = 0.0
selects no messages
testEquals5
Verifies that the selector 92d = 92
selects all messages
testEquals6
Verifies that the selector 93f = 93
selects all messages
testEqualsProperty
Verifies that the selector rate = 0.2
selects all messages, when the double property 'rate' is set, with value 0.2
testFloatNaN1
Verifies that the selector floatNaN = floatNaN
selects no messages, when the float property 'floatNaN' is set, with value Float.NaN
(as NaN != NaN)
testFloatNaN2
Verifies that the selector floatNaN <> floatNaN
selects all messages, when the float property 'floatNaN' is set, with value Float.NaN
testGreaterEquals1
Verifies that the selector 2.0 >= 1.0
selects all messages
testGreaterEquals2
Verifies that the selector 1.0 >= 2.0
selects no messages
testGreaterThan1
Verifies that the selector 2.0 > 1.0
selects all messages
testGreaterThan2
Verifies that the selector 1.0 > 2.0
selects no messages
testInvalid1
Verifies that the selector 1.0
throws InvalidSelectorException
testInvalid2
Verifies that the selector -1.0
throws InvalidSelectorException
testInvalid3
Verifies that the selector 2.0 < '3.0'
throws InvalidSelectorException
testInvalid4
Verifies that the selector 1.0 <> false
throws InvalidSelectorException
testInvalid5
Verifies that the selector 1a.0 = 1a.0
throws InvalidSelectorException
testLessEquals1
Verifies that the selector 1.0 <= 2.0
selects all messages
testLessEquals2
Verifies that the selector 2.0 <= 1.0
selects no messages
testLessThan1
Verifies that the selector 1.0 < 2.0
selects all messages
testLessThan2
Verifies that the selector 2.0 < 1.0
selects no messages
testNotEquals1
Verifies that the selector 1.0 <> 2.0
selects all messages
testNotEquals2
Verifies that the selector 1.0 <> 1.0
selects no messages
testNotEquals3
Verifies that the selector 1.0 <> 1.0
selects all messages
testNotEqualsProperty
Verifies that the selector rate <> 0.2
selects no messages, when the double property 'rate' is set, with value 0.2
testNumericRange
Verifies that selectors can have approximate numeric literals in the range Double.MIN_VALUE..Double.MAX_VALUE
, using the selector {min-value}={min-value} and {max-value} = {max-value}
where {min-value} and {max-value} are the values of Double.MIN_VALUE and Double.MAX_VALUE respectively. This should select all messages.
testUnaryMinus1
Verifies that the selector -1.0 = -1.0
selects all messages
testUnaryMinus2
Verifies that the selector -1.0 = 1.0
selects no messages
testUnaryMinus3
Verifies that the selector --1.0 = 1.0
selects all messages
testUnsetProperty1
Verifies that the selector dummy + 10.0 = 10.0
selects no messages, for the unset property 'dummy'
testUnsetProperty2
Verifies that the selector dummy - 10.0 = -10.0
selects no messages, for the unset property 'dummy'
testUnsetProperty3
Verifies that the selector 10.0 + dummy = 10.0
selects no messages, for the unset property 'dummy'
testUnsetProperty4
Verifies that the selector 10.0 - dummy = 0.0
selects no messages, for the unset property 'dummy'
testUnsetProperty5
Verifies that the selector dummy * 10.0 = 0.0
selects no messages, for the unset property 'dummy'
testUnsetProperty6
Verifies that the selector 10.0 * dummy = 0.0
selects no messages, for the unset property 'dummy'
testUnsetProperty7
Verifies that the selector dummy / 10.0 = 0.0
selects no messages, for the unset property 'dummy'
testUnsetProperty8
Verifies that the selector 10.0 / dummy = 0.0
selects no messages, for the unset property 'dummy'
org.exolab.jmscts.test.message.copy.ObjectMessageTest
This class tests that ObjectMessage
copies content
getMessagePopulator
Get the message populator. This implementation always returns null
suite
Sets up the test suite
testByteArrayCopy
Verifies that ObjectMessage.setObject()
copies byte arrays
testCopyAtConstruction
Verifies that ObjectMessage.getObject()
returns a different reference to that set, when the object is supplied at construction
testCustomObjectCopy
Verifies that ObjectMessage.setObject()
copies user objects
org.exolab.jmscts.stress.ReceiveSize0KTest
Performs a stress test using one producer, one consumer and empty messages.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
getMessagePopulator
Get the message populator. This implementation returns null
shouldCreateMessage
Determines if messages should be pre-created and populated for the test.
suite
Sets up the test suite
test
Performs a stress test using: - a single consumer
- empty messages
For CLIENT_ACKNOWLEDGE sessions, each message is acknowledged.
org.exolab.jmscts.test.selector.IdentifierTest
This class tests selector identifiers.
suite
Sets up the test suite
testDollars
Verifies that identifiers may contain '$' characters, using the selector $State = 'VIC'
and property '$State' with value 'VIC'. This should select all messages.
testInvalid1
Verifies that the selector ~ABC = 'foo'
throws InvalidSelectorException
testInvalid2
Verifies that the selector Country.name = 'Australia'
throws InvalidSelectorException
testUnderscores
Verifies that identifiers may contain '_' characters, using the selector _postcode_ = '3001'
and property '_postcode_' with value '3001'. This should select all messages.
testUserIdentifierCase
Verifies that user identifier names are case sensitive, using the selector country = 'Australia'
, and property 'Country' with value 'Australia'. This shouldn't select any messages.
org.exolab.jmscts.test.selector.EmptySelectorTest
This class tests the behaviour of empty selectors.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
getMessagePopulator
Get the message populator. This implementation always returns null
suite
Sets up the test suite
testEmpty
Verifies that consumer creation operations accept an empty string as a valid selector
testNull
Verifies that consumer creation operations accept null as a valid selector
org.exolab.jmscts.test.message.copy.StreamMessageTest
This class verifies that StreamMessage
copies content
getMessagePopulator
Get the message populator. This implementation always returns null
suite
Sets up the test suite
testByteArrayCopy
Verifies that StreamMessage.setObject()
copies byte arrays
testPartialWriteBytesCopy
Verifies that StreamMessage.writeBytes(byte[], int, int)
takes a copy of the byte array.
testWriteBytesCopy
Verifies that StreamMessage.writeBytes(byte[])
takes a copy of the byte array.
org.exolab.jmscts.test.topic.DurableSubscriberTest
This class tests the behaviour of durable TopicSubscribers
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
suite
Sets up the test suite
testChangeSubscription
Verifies that a client can change an existing durable subscription by creating a durable subscriber with the same name and a new topic.
testDurableSubscriber
Verifies that a durable subscriber can be created for a session, closed, and recreated.
testUnsubscribe
Verifies that a durable subscriber can be created for a session, unsubscribed, and recreated
org.exolab.jmscts.test.selector.JMSPriorityTest
This class tests selectors containing JMSPriority
suite
Sets up the test suite
testInvalid1
Verifies that the selector JMSPriority >= '0'
throws InvalidSelectorException
testInvalid2
Verifies that the selector '0' <= JMSPriority
throws InvalidSelectorException
testJMSPriority
Verifies that messages can be selected on JMSPriority, using the selector JMSPriority <> 0
. This should select all messages
testJMSPriorityCase
Verifies that JMS identifier names are case sensitive, using the selector jmspriority between 1 and 9
. This shouldn't select any messages.
org.exolab.jmscts.test.selector.StringTest
This class tests selectors containing string literals and objects
suite
Sets up the test suite
testCaseComparison1
Verifies that string literals are case sensitive, using the selector 'abc' = 'ABC'
. This shouldn't select any messages.
testCaseComparison2
Verifies that string literals are case sensitive, using the selector 'abc' <> 'ABC'
. This should select all messages.
testCaseComparison3
Verifies that string literals are case sensitive when compared with string properties, using the selector Country = 'france'
, and the string property 'Country', with value 'France'. This should select no messages.
testCheckSingleQuotes1
Verifies that string literals can contain embedded quotes, using the selector 'it''s' = 'it''s'
. This should select all messages
testCheckSingleQuotes2
Verifies that the quotes are preserved in string literals with embedded quotes, using the selector 'it''s' = 'its'
. This should select no messages
testEquals
Verifies that the selector 'abc' = 'abc'
selects all messages
testEqualsProperty
Verifies that the selector Country = 'France'
selects all messages, when the string property 'Country' is set, with value 'France'
testGreaterEquals1
Verifies that the selector 'abc' >= 'abc'
throws InvalidSelectorException
testGreaterEquals2
Verifies that the selector dummy >= 'abc'
throws InvalidSelectorException
testGreaterEquals3
Verifies that the selector 'abc' >= dummy
throws InvalidSelectorException
testGreaterThan1
Verifies that the selector 'abc' > 'abc'
throws InvalidSelectorException
testGreaterThan2
Verifies that the selector dummy > 'abc'
throws InvalidSelectorException
testGreaterThan3
Verifies that the selector 'abc' > dummy
throws InvalidSelectorException
testInvalid1
Verifies that the selector 'abc'
throws InvalidSelectorException
testInvalid2
Verifies that the selector 'abc' = 'abc
throws InvalidSelectorException
testInvalid3
Verifies that the selector 'abc' = abc'
throws InvalidSelectorException
testInvalid4
Verifies that the selector 'abc = 'abc'
throws InvalidSelectorException
testInvalid5
Verifies that the selector 'abc'''' = 'abc'
throws InvalidSelectorException
testInvalid6
Verifies that the selector "abc" = "abc"
throws InvalidSelectorException
testLessEquals1
Verifies that the selector 'abc' <= 'abc'
throws InvalidSelectorException
testLessEquals2
Verifies that the selector dummy <= 'abc'
throws InvalidSelectorException
testLessEquals3
Verifies that the selector 'abc' <= dummy
throws InvalidSelectorException
testLessThan1
Verifies that the selector 'abc' < 'abc'
throws InvalidSelectorException
testLessThan2
Verifies that the selector dummy < 'abc'
throws InvalidSelectorException
testLessThan3
Verifies that the selector 'abc' < dummy
throws InvalidSelectorException
org.exolab.jmscts.test.selector.BetweenOperatorTest
This class tests selector containing the BETWEEN operator.
suite
Sets up the test suite
testBetween1
Verifies that the selector 17 between 16 and 18
selects all messages
testBetween2
Verifies that the selector 17 between 18 and 19
selects no messages
testBetween3
Verifies that the selector 17 Between 17 And 17
selects all messages
testBetween4
Verifies that the selector 17 between 4 * 4 and 10 + 8
selects all messages
testBetween5
Verifies that the selector 17 between 4 * 5 and 10 + 12
selects no messages
testBetween6
Verifies that the selector two between one and three
selects all messages, where one, two and three are integer properties with with corresponding values
testInvalid1
Verifies that the selector two between '1' and '3'
throws InvalidSelectorException
testInvalid2
Verifies that the selector one between false and true
throws InvalidSelectorException
testInvalid3
Verifies that the selector b' between 'a' and 'c'
throws InvalidSelectorException
testInvalid4
Verifies that the selector between 1 and 3
throws InvalidSelectorException
testInvalid5
Verifies that the selector not between 1 and 3
throws InvalidSelectorException
testInvalid6
Verifies that the selector 2 between 1, 3
throws InvalidSelectorException
testInvalid7
Verifies that the selector 2 between 1 and
throws InvalidSelectorException
testInvalid8
Verifies that the selector 2 between and 3
throws InvalidSelectorException
testInvalid9
Verifies that the selector JMSMessageID between 1 and 10
throws InvalidSelectorException
testNotBetween1
Verifies that the selector 17 not between 18 and 19
selects all messages
testNotBetween2
Verifies that the selector 17 not between 16 and 18
selects no messages
testNotBetween3
Verifies that the selector 17 not between 17 and 17
selects no messages
testNotBetween4
Verifies that the selector 17 Not Between 4 * 5 And 20 / 1
selects all messages
testNotBetween5
Verifies that the selector two not between one and three
selects all messages, where one, two and three are integer properties with with corresponding values
testUnsetProperty1
Verifies that the selector dummy between 1 and 10
selects no messages, for the unset property 'dummy'
testUnsetProperty2
Verifies that the selector 1 between dummy and 10
selects no messages, for the unset property 'dummy'
testUnsetProperty3
Verifies that the selector 1 between 0 and dummy
selects no messages, for the unset property 'dummy'
org.exolab.jmscts.test.message.properties.JMSXGroupTest
This class tests that connections support JMSXGroupID and JMSXGroupSeq properties
NOTE: the specification is not clear on the behaviour of null values for these properties.
checkProperty
Verifies that atttempting to use an invalid property value throws MessageFormatException
checkSequenceValue
Verifies a value for the JMSXGroupSeq property
checkSequenceValue
Verifies a value for the JMSXGroupSeq property
suite
Sets up the test suite
testJMSGroupSeq
Verifies that the only allowed type for JMSXGroupID is an int.
testJMSGroupSeqRange
Verifies that JMSXGroupSeq only handles ints > 0
testJMSXGroupID
Verifies that the only allowed type for JMSXGroupID is a String.
org.exolab.jmscts.test.topic.NoLocalTest
This class tests the behaviour of the noLocal argument of TopicSubscriber
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
suite
Sets up the test suite
testNoLocal
Verifies the behaviour of the subscriber noLocal attribute
org.exolab.jmscts.test.message.clear.SendReceiveClearTest
This class tests the behaviour of Message.clearBody()
and Message.clearProperties()
on send and receipt, against all message, delivery, and transaction types
checkClearBodyOnReceipt
Verifies that Message.clearProperties()
leaves the message properties empty, and doesn't clear the message body, on receipt of a message.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
getMessagePopulator
Get the message populator. This implementation returns null, as population is handled by the test cases.
suite
Sets up the test suite
testBytesClearBodyOnReceipt
Verifies that BytesMessage.clearBody()
leaves the message body empty, and doesn't clear the message properties, on receipt of a message.
testClearBodyOnReceipt
Verifies that Message.clearBody()
leaves the message body empty, and doesn't clear the message properties, on receipt of a message.
testClearOnSend
Verifies that Message.clearProperties()
and Message.clearBody()
on send doesn't affect the sent message
testClearPropertiesOnReceipt
Verifies that Message.clearProperties()
leaves the message properties empty, and doesn't clear the message body, on receipt of a message.
testStreamClearBodyOnReceipt
Verifies that StreamMessage.clearBody()
leaves the message body empty, and doesn't clear the message properties, on receipt of a message.
org.exolab.jmscts.test.message.foreign.ForeignMessageTest
This class tests the behaviour of sending 'foreign' messages. A 'foreign' message is one whose implementation is not one of those of the target provider.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-create destinations prior to running the test case.
suite
Sets up the test suite
test
Verifies that 'foreign' messages are supported by the JMS provider
org.exolab.jmscts.test.session.transacted.CloseTest
This class tests session rollback functionality.
getDestinations
Returns the list of destination names used by this test case. These are used to pre-administer destinations prior to running the test case.
suite
Sets up the test suite.
testRollbackForClosedConnection
Verifies that closing a connection rolls back the transactions in progress on its transacted sessions.
testRollbackForClosedSession
Verifies that closing a session rolls back the transaction in progress
org.exolab.jmscts.test.producer.ttl.ExpirationTest
This class tests message expiration
checkExpiration
Sends messageCount
messages with time-to-live timeToLive
, and messageCount
messages which don't expire, and verifies that after sleeping timeToLive + EXPIRATION_INTERVAL
milliseconds, only the non-expiring messages may be received
checkExpiration
Sends messageCount
messages with time-to-live timeToLive
, and messageCount
messages which don't expire, and verifies that after sleeping timeToLive + EXPIRATION_INTERVAL
milliseconds, only the non-expiring messages may be received
getDestinations
Returns the list of destination names used by this test case. These are used to pre-administer destinations prior to running the test case.
suite
Sets up the test suite
testExpiration
Verifies that messages expire. It sends two groups of messages - one group which expires after 1 second, and another which don't expire, and verifies that after the first group should have expired, only the non-expiring group can be received. If the JMS provider doesn't support immediate expiration of messages, the org.exolab.jmscts.test.producer.ttl.ExpirationTest.expirationInterval property should be configured in jmscts.properties to delay the test until the expired messages are collected.
testExpiration2DiffSubscribers
Verifies that messages to topics expire, when one subscriber is durable, and the other non-durable. It sends two groups of messages - one group which expires after 1 second, and another which don't expire, and verifies that after the first group should have expired, only the non-expiring group can be received. If the JMS provider doesn't support immediate expiration of messages, the org.exolab.jmscts.test.producer.ttl.ExpirationTest.expirationInterval property should be configured in jmscts.properties to delay the test until the expired messages are collected.
testExpiration2Subscribers
Verifies that messages to topics expire, when there is more than one subscriber. It sends two groups of messages - one group which expires after 1 second, and another which don't expire, and verifies that after the first group should have expired, only the non-expiring group can be received. If the JMS provider doesn't support immediate expiration of messages, the org.exolab.jmscts.test.producer.ttl.ExpirationTest.expirationInterval property should be configured in jmscts.properties to delay the test until the expired messages are collected.
testSingleMessageExpiration
Verifies that a single message expires. It sends two messages - one which expires after 1 second, and another which doesn't expire, and verifies that after the first should have expired, only the non-expiring message can be received. If the JMS provider doesn't support immediate expiration of messages, the org.exolab.jmscts.test.producer.ttl.ExpirationTest.expirationInterval property should be configured in jmscts.properties to delay the test until the expired messages are collected.