Package redis.clients.jedis

Examples of redis.clients.jedis.JedisSentinelPool.destroy()


  wrongSentinels.add(new HostAndPort("localhost", 65432).toString());
  wrongSentinels.add(new HostAndPort("localhost", 65431).toString());

  JedisSentinelPool pool = new JedisSentinelPool(MASTER_NAME,
    wrongSentinels);
  pool.destroy();
    }

    @Test(expected = JedisException.class)
    public void initializeWithNotMonitoredMasterNameShouldThrowException() {
  final String wrongMasterName = "wrongMasterName";
View Full Code Here


    @Test(expected = JedisException.class)
    public void initializeWithNotMonitoredMasterNameShouldThrowException() {
  final String wrongMasterName = "wrongMasterName";
  JedisSentinelPool pool = new JedisSentinelPool(wrongMasterName,
    sentinels);
  pool.destroy();
    }

    @Test
    public void checkCloseableConnections() throws Exception {
  GenericObjectPoolConfig config = new GenericObjectPoolConfig();
View Full Code Here

      }
  } finally {
      if (jedis2 != null)
    pool.returnResource(jedis2);

      pool.destroy();
  }
    }

    @Test
    public void checkResourceIsCloseable() {
View Full Code Here

  JedisSentinelPool pool = new JedisSentinelPool(MASTER_NAME, sentinels,
    config, 1000, "foobared", 2);

  Jedis nullJedis = null;
  pool.returnResource(nullJedis);
  pool.destroy();
    }

    @Test
    public void returnBrokenResourceWithNullResource() {
  GenericObjectPoolConfig config = new GenericObjectPoolConfig();
View Full Code Here

  JedisSentinelPool pool = new JedisSentinelPool(MASTER_NAME, sentinels,
    config, 1000, "foobared", 2);

  Jedis nullJedis = null;
  pool.returnBrokenResource(nullJedis);
  pool.destroy();
    }

    private void forceFailover(JedisSentinelPool pool)
      throws InterruptedException {
  HostAndPort oldMaster = pool.getCurrentHostMaster();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.