[
https://issues.apache.org/jira/browse/HBASE-21929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16772469#comment-16772469
]
Duo Zhang commented on HBASE-21929:
-----------------------------------
Please use try-with-resources to close the connection and the table instance.
And please remove this line:
{code}
@Rule public ExpectedException thrown = ExpectedException.none();
{code}
It is useless.
And maybe we create a synchronized list directly via
Collections.synchronizedList, so we do not need to write done the synchronized
keyword explicitly later.
> The checks at the end of TestRpcClientLeaks are not executed
> ------------------------------------------------------------
>
> Key: HBASE-21929
> URL: https://issues.apache.org/jira/browse/HBASE-21929
> Project: HBase
> Issue Type: Bug
> Components: test
> Reporter: Duo Zhang
> Assignee: Xu Cang
> Priority: Major
> Attachments: HBASE-21929.master.001.patch
>
>
> The UT is not implemented correctly, when executing table.get we will throw
> exception out, and the checks below will not be executed, we should catch the
> exception, instead of using @Test(expected = xxx).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)