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

Rajini Sivaram commented on KAFKA-2057:
---------------------------------------

There is a small timing window in the test because the test was calculating the 
actual expiry time from a point after the timer was started for the delayed 
operation. A small delay in executing the start time initialization in the test 
(for example, due to garbage collection) can cause the test to fail as a 
result. The attached patch changes the order in which start time of the expiry 
interval is initialized in the test.

Could recreate failure only with an artificial delay introduced in the test 
code. With the fix, test passes even with this delay.

> DelayedOperationTest.testRequestExpiry transient failure
> --------------------------------------------------------
>
>                 Key: KAFKA-2057
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2057
>             Project: Kafka
>          Issue Type: Sub-task
>            Reporter: Guozhang Wang
>            Assignee: Rajini Sivaram
>              Labels: newbie
>         Attachments: KAFKA-2057.patch
>
>
> {code}
> kafka.server.DelayedOperationTest > testRequestExpiry FAILED
>     junit.framework.AssertionFailedError: Time for expiration 19 should at 
> least 20
>         at junit.framework.Assert.fail(Assert.java:47)
>         at junit.framework.Assert.assertTrue(Assert.java:20)
>         at 
> kafka.server.DelayedOperationTest.testRequestExpiry(DelayedOperationTest.scala:68)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to