atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Wallis <graham_wal...@uk.ibm.com>
Subject Re: Quick questions on AdaptiveWaiterTest
Date Tue, 17 Oct 2017 15:17:58 GMT
The difference in behaviour appears to be JDK specific. 
Sometime I will investigate just out of curiosity.

Best regards,
  Graham

Graham Wallis
IBM Analytics Emerging Technology Center
Internet: graham_wallis@uk.ibm.com 
IBM Laboratories, Hursley Park, Hursley, Hampshire SO21 2JN
Tel: +44-1962-815356    Tie: 7-245356




From:   Graham Wallis <graham_wallis@uk.ibm.com>
To:     dev@atlas.apache.org
Date:   17/10/2017 15:22
Subject:        Quick questions on AdaptiveWaiterTest



Hi,

When running the webapp testcase AdaptiveWaiterTest I get a failed 
assertion from basicTest(). The assertion expected [95] but found [100]. I 

am running this on Windows, but I don't see that should make any 
difference.

It seems to me that NotificationHookConsumer.AdaptiveWaiter is behaving as 

I would expect: 
On the first iteration of basicTest, the time since last wait will be 0 
and the waitDuration will be set to minDuration+increment (which is 5 + 5 
= 10). So the first sleep will be for 10ms. 
On the subsequent iteration in basicTest, time since last wait will be 
10ms and the waitDuration will again be incremented, this time to 15ms. 
The next iteration should sleep for 20ms, and so on. 
On the 20th (and final) iteration I would therefore expect the time since 
last wait to be 10 + 18*5 = 100ms, and waitDuration will initially be 
incremented to 105ms, but will then be thresholded at 100ms. So I would 
have expected a wait time of 100. Which would mean the test is correct.

Q: Does anyone understand why the assertion is expecting 95ms?
Q: Does anyone else see failures of this test? 
Q: Does the test pass on Mac or Linux platforms? 


Best regards,
  Graham

Graham Wallis
IBM Analytics Emerging Technology Center
Internet: graham_wallis@uk.ibm.com 
IBM Laboratories, Hursley Park, Hursley, Hampshire SO21 2JN
Tel: +44-1962-815356    Tie: 7-245356

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message