Issue Details (XML | Word | Printable)

Key: AMQ-1366
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Dingwen Yuan
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ActiveMQ

Stomp property "expires" not properly supported

Created: 20/Aug/07 06:03 PM   Updated: 24/Aug/07 01:28 AM
Return to search
Component/s: Transport
Affects Version/s: 5.0.0
Fix Version/s: 4.1.1

Time Tracking:
Not Specified

File Attachments:
  Size
Text File difffile.txt 2007-08-20 06:03 PM Dingwen Yuan 1 kB
Environment: JDK1.6.0 WinXP Pro


 Description  « Hide
When a stomp queue message sent with "expires" property set to non-zero, AMQ will not route it to the destination.

I have added a function to the unit test class org.apache.activemq.transport.stomp.StompTest, to expose that bug.

public void testStompExpireProperty() throws Exception
It connects to a stomp server (AMQ) and subscribes for a queue. Then it sends a SEND frame to this queue with "expires" set to non-zero value. On version 5.0, you will get this exception:

java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.net.SocketInputStream.read(SocketInputStream.java:182)
at org.apache.activemq.transport.stomp.StompConnection.receiveFrame(StompConnection.java:64)
at org.apache.activemq.transport.stomp.StompConnection.receiveFrame(StompConnection.java:56)
at org.apache.activemq.transport.stomp.StompTest.testStompExpireProperty(StompTest.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at org.apache.activemq.CombinationTestSupport.runBare(CombinationTestSupport.java:98)
at org.apache.activemq.CombinationTestSupport.runBare(CombinationTestSupport.java:104)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

Attached is a diff file for the unit test.



 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
No related reviews found.