ChannelImplTest.testDispatchAsync failed on my box caused by time issue
-----------------------------------------------------------------------

                 Key: SMX4NMR-127
                 URL: https://issues.apache.org/activemq/browse/SMX4NMR-127
             Project: ServiceMix NMR
          Issue Type: Test
            Reporter: Freeman Fang
            Assignee: Freeman Fang
            Priority: Minor
             Fix For: 1.0.0


the error detail is
java.lang.AssertionError:
  Expectation failure on verify:
    exchangeDelivered(same([
  id:        c66bb086-4238-4261-b884-1e69c04cd47f
  mep:       InOnly
  status:    Active
  role:      Consumer
  target:    PropertyMatchingReference[{NAME=ep2}]
]
)): expected: 1, actual: 0
        at org.easymock.internal.MocksControl.verify(MocksControl.java:101)
        at org.easymock.EasyMock.verify(EasyMock.java:1570)
        at 
org.apache.servicemix.nmr.core.ChannelImplTest.testDispatchAsync(ChannelImplTest.java:69)

The reason is  verify the ExchangeListener.exchangeDelivered get invoked 
immediately after the async invocation ep1.channel.send(e)(non blcok 
invcation), but in some case the message not delivered at the verify time
we may need add Thread.sleep between 
{code}
        ep1.channel.send(e);
        Thread.sleep(1000);// waiting to ensure the message get delivered 
before the verify
        verify(listener);
{code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to