Commit Graph

11 Commits

Author SHA1 Message Date
Jonathan Leibiusky
105ca9f5bb Reformat all files in the project according to java conventions. 2014-01-31 11:24:06 -05:00
Jonathan Leibiusky
265eab0cc9 Merge branch 'reset-state-of-jedis-client' of github.com:HeartSaVioR/jedis into HeartSaVioR-reset-state-of-jedis-client 2014-01-28 16:50:11 -05:00
Jonathan Leibiusky
23b54c2cef Fix sentinel test not to be so sensitive to time 2014-01-16 20:37:47 -05:00
Jungtaek Lim
3073f778b4 JedisPool / JedisSentinelPool resets returning object's state (watched,
multi)

* BinaryClient / BinaryJedis : added feature to reset its state
(watched, multi)
* JedisPool / JedisSentinelPool : calls new feature (reset state) when
Jedis object returns to pool
* Unit Test included
2013-12-21 01:33:46 +09:00
Jonathan Leibiusky
8624d1695d make JedisSentinelPool fast 2013-12-03 19:47:15 -05:00
Jonathan Leibiusky
18652b906b Merge branch 'speed-up-unit-test' of github.com:HeartSaVioR/jedis into upgrade_libs
Conflicts:
	src/test/java/redis/clients/jedis/tests/JedisPoolTest.java
	src/test/java/redis/clients/jedis/tests/JedisSentinelPoolTest.java
	src/test/java/redis/clients/jedis/tests/JedisSentinelTest.java
	src/test/java/redis/clients/jedis/tests/ShardedJedisPipelineTest.java
	src/test/java/redis/clients/jedis/tests/ShardedJedisPoolTest.java
	src/test/java/redis/clients/jedis/tests/benchmark/PoolBenchmark.java
	src/test/java/redis/clients/jedis/tests/commands/TransactionCommandsTest.java
2013-11-29 12:12:30 -05:00
Jonathan Leibiusky
bbb867781d upgrade to commons-pool 2 2013-11-28 08:13:57 -05:00
Jungtaek Lim
7e1a1a70b2 Speed up Sentinel related tests
* remove FIXME sleep codes for Sentinel related tests
** add functions for Sentinel tests (JedisSentinelTestUtil)
*** waitForSentinelRecognizeRedisReplication
*** waitForNewPromotedMaster
*** waitForSentinelsRecognizeEachOthers
**** TODO: there're no command for sentinel to list recognized sentinel
**** sleep 5.5 sec (sentinel pings to master every 5 sec)

* set HostAndPort class to public(no longer inner) class
** reason: We cannot know pool's current master if HostAndPort class is
private inner class / HostAndPort classes are duplicated (main/test)
** make getter method and parameterized constructor
*** set fields once, get anytime
2013-10-07 11:03:32 +09:00
Jungtaek Lim
35a2dfd4c0 JedisSentinelPool now takes care of multi failover
* Now Pool.initPool() call closeInternalPool(), instead of destroy()
** calling destroy() in Pool.initPool() may have side effect, and JedisSentinelPool did
* modify unit test to test failover twice (needs +1 slave)
** modify configurations for additional slave
2013-09-26 10:48:17 +09:00
Jonathan Leibiusky
ad58f816b6 make sure that JedisSentinelPool use timeout, password and db 2013-09-15 15:33:22 -03:00
Hisham Mardam-Bey
39d81d8f1f Added a JUnit test for JedisSentinelPool.
This test will set up and get a master from a Redis master slave pair being
watched by 2 Sentinels. It pings the master, segfaults it, asks the pool for
another connection and makes sure it can ping it.

This commit also restores the pom.xml file's scm information back to
xetorthio and adds the default Sentinel port to the Procotol.
2013-08-28 23:10:50 -04:00