Contribution to StompConnect tests

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Contribution to StompConnect tests

Jeff Mesnil
Hi,

As I wrote previously, I'm working on adding native Stomp support to HornetQ[1].

To check our implementation, I started from stompconnect's StompTest and added nitpick tests to clarify my understanding of the spec and to make sure our implementation is compliant to the spec.
I'd like to contribute them back to stompconnect (test.patch).

I added tests to:
- check a RECEIPT response to a SEND message with a receipt header
- check that a SEND with content-length can be consumed as a ByteMessage
- check that after a DISCONNECT, a SEND will be replied with an ERROR
- check that a message is not receivable before a tx is committed
  otherwise testTransactionCommit passes even though I've not implemented the TX commands :)

I have also two remarks concerning the 1.0 spec[2]:
- about RECEIPT response:
  it should be "Any client frame other than CONNECT *and DISCONNECT*  may specify a receipt header with an arbitrary value."
  AIUI, it makes not sense to send a RECEIPT in response to a DISCONNECT since the socket will be closed after the server handled the DISCONNECT.
- StompConnect accepts SUB and UNSUB as valid commands in addition to SUBSCRIBE & UNSUBSCRIBE.
  Are the short ones valid or used by Stomp clients (regardless of what the spec says)?

hope that helps,
jeff

[1] https://jira.jboss.org/jira/browse/HORNETQ-129
[2] http://activemq.apache.org/stomp/stomp10/specification.html

Reply | Threaded
Open this post in threaded view
|

Re: Contribution to StompConnect tests

Jeff Mesnil
As promised, I've committed the few tests I added to StompTest[1] while writing STOMP support to HornetQ.

Reusing stompconnect tests to check our implementation saved me a lot of time, so thanks to everybody who contributed to stompconnect.

regards,
jeff

[1] http://fisheye.codehaus.org/changelog/stomp/trunk/stompconnect/src/test/java/org/codehaus/stomp/StompTest.java?cs=90