[
https://issues.apache.org/jira/browse/BOOKKEEPER-689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13788333#comment-13788333
]
Rakesh R commented on BOOKKEEPER-689:
-------------------------------------
bq.this is a test case timeout, in this test case, scheduler will not be used.
Yeah I agree.
[~ikelly] I also tried several times but couldn't see a failure. In our
codebase, if not properly shutdown, close is simply giving a WARN and continue.
Does this induce any leaks or how long the shutdown will wait?
Shutdown ExecutorService, javadoc says 'shutdownNow', when normal shutdown
returns false:
{code}
pool.shutdown(); // Disable new tasks from being submitted
// Wait a while for existing tasks to terminate
if (!pool.awaitTermination(60, TimeUnit.SECONDS)) {
pool.shutdownNow(); // Cancel currently executing tasks
// Wait a while for tasks to respond to being cancelled
if (!pool.awaitTermination(60, TimeUnit.SECONDS))
System.err.println("Pool did not terminate");
}
{code}
Any thoughts?
> BookKeeperTest failure
> ----------------------
>
> Key: BOOKKEEPER-689
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-689
> Project: Bookkeeper
> Issue Type: Bug
> Reporter: Flavio Junqueira
> Assignee: Sijie Guo
> Attachments: BOOKKEEPER-689.diff,
> org.apache.bookkeeper.client.BookKeeperTest-output.txt,
> TEST-org.apache.bookkeeper.client.BookKeeperTest.xml
>
>
> Tests run: 12, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 49.385 sec
> <<< FAILURE!
> testCloseDuringOp[1](org.apache.bookkeeper.client.BookKeeperTest) Time
> elapsed: 14.74 sec <<< FAILURE!
> junit.framework.AssertionFailedError: Close never completed
> at junit.framework.Assert.fail(Assert.java:47)
> at junit.framework.Assert.assertTrue(Assert.java:20)
> at
> org.apache.bookkeeper.client.BookKeeperTest.testCloseDuringOp(BookKeeperTest.java:217)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> 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)
--
This message was sent by Atlassian JIRA
(v6.1#6144)