[ 
https://issues.apache.org/jira/browse/AMQ-3875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13526555#comment-13526555
 ] 

Arthur Naseef commented on AMQ-3875:
------------------------------------

Running this version, I get the following results:
{noformat}
There were 3 failures:
1) testPersistentTransacted(org.apache.activemq.bugs.TestProducerFlowControl)
java.lang.AssertionError: Second destination failed to receive message
        at org.junit.Assert.fail(Assert.java:91)
        at org.junit.Assert.assertTrue(Assert.java:43)
        at 
org.apache.activemq.bugs.TestProducerFlowControl.testOneMode(TestProducerFlowControl.java:352)
        at 
org.apache.activemq.bugs.TestProducerFlowControl.testPersistentTransacted(TestProducerFlowControl.java:230)
        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 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
        at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
        at org.junit.runners.Suite.runChild(Suite.java:115)
        at org.junit.runners.Suite.runChild(Suite.java:23)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
        at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:116)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:107)
        at org.junit.runner.JUnitCore.runMain(JUnitCore.java:88)
        at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:54)
        at org.junit.runner.JUnitCore.main(JUnitCore.java:46)
2) 
testNonPersistentNonTransacted(org.apache.activemq.bugs.TestProducerFlowControl)
java.lang.AssertionError: FAILED to hit producer-flow-control at 1000
        at org.junit.Assert.fail(Assert.java:91)
        at org.junit.Assert.assertTrue(Assert.java:43)
        at 
org.apache.activemq.bugs.TestProducerFlowControl.testOneMode(TestProducerFlowControl.java:327)
        at 
org.apache.activemq.bugs.TestProducerFlowControl.testNonPersistentNonTransacted(TestProducerFlowControl.java:241)
        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 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
        at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
        at org.junit.runners.Suite.runChild(Suite.java:115)
        at org.junit.runners.Suite.runChild(Suite.java:23)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
        at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:116)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:107)
        at org.junit.runner.JUnitCore.runMain(JUnitCore.java:88)
        at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:54)
        at org.junit.runner.JUnitCore.main(JUnitCore.java:46)
3) testNonPersistentTransacted(org.apache.activemq.bugs.TestProducerFlowControl)
java.lang.AssertionError: Second destination failed to receive message
        at org.junit.Assert.fail(Assert.java:91)
        at org.junit.Assert.assertTrue(Assert.java:43)
        at 
org.apache.activemq.bugs.TestProducerFlowControl.testOneMode(TestProducerFlowControl.java:352)
        at 
org.apache.activemq.bugs.TestProducerFlowControl.testNonPersistentTransacted(TestProducerFlowControl.java:252)
        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 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
        at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
        at org.junit.runners.Suite.runChild(Suite.java:115)
        at org.junit.runners.Suite.runChild(Suite.java:23)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
        at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:116)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:107)
        at org.junit.runner.JUnitCore.runMain(JUnitCore.java:88)
        at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:54)
        at org.junit.runner.JUnitCore.main(JUnitCore.java:46)

{noformat}

Note that the "Second destination failed to receive message" is an indication 
of the problem - the connection is blocked.  However, the "FAILED to hit 
producer-flow-control at 1000" error means the test case didn't work as 
expected because PFC was expected to block sends and didn't appear to do so.

                
> Client / NetworkBridge Connection blocks all communication at the transport 
> when producer-flow-control reached
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-3875
>                 URL: https://issues.apache.org/jira/browse/AMQ-3875
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.4.2
>            Reporter: Arthur Naseef
>         Attachments: TestProducerFlowControl.java, 
> TestProducerFlowControl.java
>
>
> When producer-flow-control throttles a producer, the entire connection for 
> the client, or network bridge, can be blocked until space clears.
> A unit test will be attached that demonstrates this situation with any of the 
> following types of messaging:
> * PERSISTENT, transacted
> * NON-PERSISTENT, non-transacted
> * NON-PERSISTENT, transacted
> PERSISTENT, non-transacted messages don't have this problem.  Internally, it 
> seems that any time messages are sent asynchronously across the transport 
> (i.e. isResponseRequired() == false), the problem occurs.
> The expected operation is for producers to the destination to block on send() 
> and all other operations across the same connection to continue normally.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to