xetorthio/jedis — pull request #499 by HeartSaVioR (2013-12-12 15:26:53+00:00)
Title: Fix some timing issues related to JedisSentinelPool and ControlCommandsTest

Sometimes unit tests hang or fail whether Redis (and Sentinels) are having issues or not.

Monitor command test sometimes hang when input thread run earlier than monitor thread.
JedisSentinelPoolTest sometimes fail when test requests jedis instance from pool but pool is being re-initialized because of master changed. (assertOpen() failed)

Below is commit log

====

* Pool
** synchronize all inner pool usages (to avoid timing issue)
* JedisSentinelPool
** when master changed, change current master information after reinitialize inner pool
* ControlCommandsTest
** fix monitor command test - monitor
* JedisSentinelPoolTest
** fix resource leak (jedis instance not returned to pool)