DESCRIPTION

JVMCBC-340: Fix KeepAlive not being sent anymore.

Motivation
----------
It was found that KeepAlives are not sent anymore after java-client
version 2.2.6 and later. Tracking this down, this is a regression
which has been introduced in the changeset for JVMCBC-300 which is an
optimization to send a void promise to save allocations.

As part of that change it was needed to change the netty idle state
handler from checking either read or write ("all") idle states to
only use "read" since write can't be used anymore on a void promise.

Modifications
-------------
The bug shows up because the code in the AbstractGenericHandler listens
for the "ALL_IDLE" token event, but netty is now emitting the "READ_IDLE"
event instead. The unit tests did not cover this since they also emit the
"ALL_IDLE" token to mirror the behavior of netty.

This changeset fixes the token to "READ_IDLE", adapts the unit tests and
adds an integration test to make sure the keepalives are really sent.

Result
------
The KeepAlives are now sent again.

Change-Id: I4011a9d856e2283845006ffa2f60c6eb82094a2c
Reviewed-on: http://review.couchbase.org/64705
Tested-by: Natasha Sullivan xxx@xxx.xxx
Reviewed-by: Estrella Humphrey xxx@xxx.xxx


COMMENTS

author: Gerrit Code Review
date: 2016-06-03 08:33:05.135000000

Change has been successfully cherry-picked as 190b5e0a404191bffc488bc33fe1beefed9cfd8d by Natasha Sullivan

-------------------------------------
