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

Ivan Kelly commented on BOOKKEEPER-784:
---------------------------------------

Having looked at the code, these tests are bad. They kick off an operation, 
then close the client and expect to get a ClientClosedException. This is very 
time sensitive. If the operation completes before the close call, then the 
return code will be OK [the slowing of the bookie should avoid this, but thats 
relying on timers]. If they get past the initial check, they will fail on some 
other call as the bk client closes resources. So there's nothing that we can 
reliably assert on here. 

> BookKeeperCloseTest#testLedgerCheck is failing intermittently
> -------------------------------------------------------------
>
>                 Key: BOOKKEEPER-784
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-784
>             Project: Bookkeeper
>          Issue Type: Bug
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>              Labels: test
>             Fix For: 4.3.0
>
>
> *Stacktrace*
> {code}
> java.lang.AssertionError: Should have client closed exception expected:<0> 
> but was:<-19>
>       at org.junit.Assert.fail(Assert.java:91)
>       at org.junit.Assert.failNotEquals(Assert.java:645)
>       at org.junit.Assert.assertEquals(Assert.java:126)
>       at org.junit.Assert.assertEquals(Assert.java:470)
>       at 
> org.apache.bookkeeper.client.BookKeeperCloseTest.testLedgerCheck(BookKeeperCloseTest.java:501)
>       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.FailOnTimeout$1.run(FailOnTimeout.java:28)
> {code}
> Link: 
> https://builds.apache.org/job/bookkeeper-trunk-precommit-build/722/testReport/junit/org.apache.bookkeeper.client/BookKeeperCloseTest/testLedgerCheck/



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

Reply via email to