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

Michael Han commented on ZOOKEEPER-2421:
----------------------------------------

{quote}If we close a client, won't the session be expired by the server
{quote}
This is correct. 
{quote}If so, then the test must be doing wrong assertion, right?
{quote}
Yes, that test was not correct in today's ZooKeeper, because close() a zk 
handle will expire the session. My guess is when the test was written, the 
semantic of zk.close is a soft close where the client was only disconnected 
from server instead of doing a hard close where the session will be expired. My 
another guess is this testSessionReuse case was trying to cover the case where 
a client application crashes (soft close) and then restarts, and then it should 
try use the old session to reconnect to server. If that's the purpose, then as 
Brian pointed out, the testSession should cover this case. 

So it sounds good to me to just remove this test case.

> testSessionReuse is commented out
> ---------------------------------
>
>                 Key: ZOOKEEPER-2421
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2421
>             Project: ZooKeeper
>          Issue Type: Bug
>            Reporter: Flavio Junqueira
>            Assignee: Prasanth Mathialagan
>            Priority: Major
>
> This test case in SessionTest:
> {noformat}
>    testSessionReuse
> {noformat}
> is commented out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to