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: I8d259fd2604f88f751bd38a449aca9acc776964e
Reviewed-on: http://review.couchbase.org/64703
Reviewed-by: Estrella Humphrey xxx@xxx.xxx
Tested-by: Natasha Sullivan xxx@xxx.xxx


COMMENTS

author: Gerrit Code Review
date: 2016-06-03 08:22:01.472000000

Change has been successfully cherry-picked as 4c66d2e9d3ae058c5fbd920234a9165a506ffbe7 by Natasha Sullivan

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