You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Gordon Sim <gs...@redhat.com> on 2008/01/15 14:14:20 UTC

java M2 test failure(?)

I noticed the following failure on the M2 branch. It seems to be 
repeatable for me; anyone else seeing this?

Can anyone shed any light on why this assertion is there?

-------------------------------------------------------------------------------
Test set: org.apache.qpid.server.failover.FailoverMethodTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 14.059 
sec <<< F
AILURE!
testFailoverRoundRobinDelay(org.apache.qpid.server.failover.FailoverMethodTest)
  Time elapsed: 6.044 sec  <<< FAILURE!
junit.framework.AssertionFailedError: Failover took less than 9.5 
seconds:6041
         at junit.framework.Assert.fail(Assert.java:47)
         at junit.framework.Assert.assertTrue(Assert.java:20)
         at 
org.apache.qpid.server.failover.FailoverMethodTest.testFailoverRoundR
obinDelay(FailoverMethodTest.java:83)


Re: java M2 test failure(?)

Posted by Gordon Sim <gs...@redhat.com>.
Gordon Sim wrote:
> Martin Ritchie wrote:
>> I would say seeing 6s as you are constitutes some well dodgy
>> Thread.sleep timings.
> 
> I'll write a little test to investigate that.

Looping on a Thread.sleep(2000) and taking the elapsed time shows pretty 
reliable behaviour. My suspicion is there is some other issue at the 
root of this. Is no-one else seeing this error?


Re: java M2 test failure(?)

Posted by Gordon Sim <gs...@redhat.com>.
Martin Ritchie wrote:
> On 15/01/2008, Gordon Sim <gs...@redhat.com> wrote:
>> I noticed the following failure on the M2 branch. It seems to be
>> repeatable for me; anyone else seeing this?
> What hardware, JVM, OS are you using?

I saw it on my laptop (IBM thinkpad T60, JDK 1.6.0_03, Fedora 5), 
however I initially noticed it from cruisecontrol running on JDK 1.5 on 
RHEL 5 (not sure of the hardware details).

>> Can anyone shed any light on why this assertion is there?
> 
> The test(of which there are two) is to verify that the delay between
> failover attempts is in place. The test should make 5 reconnection
> attempts with a 2second delay before each attempt hence 10 seconds
> should be waited. But Thread.sleep(2000) is not always 2000ms.
> 
> I would say seeing 6s as you are constitutes some well dodgy
> Thread.sleep timings.

I'll write a little test to investigate that.

Re: java M2 test failure(?)

Posted by Martin Ritchie <ri...@apache.org>.
On 15/01/2008, Gordon Sim <gs...@redhat.com> wrote:
> I noticed the following failure on the M2 branch. It seems to be
> repeatable for me; anyone else seeing this?
What hardware, JVM, OS are you using?

> Can anyone shed any light on why this assertion is there?

The test(of which there are two) is to verify that the delay between
failover attempts is in place. The test should make 5 reconnection
attempts with a 2second delay before each attempt hence 10 seconds
should be waited. But Thread.sleep(2000) is not always 2000ms.

I would say seeing 6s as you are constitutes some well dodgy
Thread.sleep timings.


> -------------------------------------------------------------------------------
> Test set: org.apache.qpid.server.failover.FailoverMethodTest
> -------------------------------------------------------------------------------
> Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 14.059
> sec <<< F
> AILURE!
> testFailoverRoundRobinDelay(org.apache.qpid.server.failover.FailoverMethodTest)
>   Time elapsed: 6.044 sec  <<< FAILURE!
> junit.framework.AssertionFailedError: Failover took less than 9.5
> seconds:6041
>          at junit.framework.Assert.fail(Assert.java:47)
>          at junit.framework.Assert.assertTrue(Assert.java:20)
>          at
> org.apache.qpid.server.failover.FailoverMethodTest.testFailoverRoundR
> obinDelay(FailoverMethodTest.java:83)
>
>


-- 
Martin Ritchie