Examples of shutdownPeer()


Examples of com.linkedin.d2.quorum.ZKPeer.shutdownPeer()

  public void testD2ConfigWithZKQuorumV3DegraderDefaultPartitionFollowerPeerDown() throws Exception
  {
    setup();
    String connectionString = _quorum.getHosts();
    ZKPeer follower = _quorum.getQuorumFollower();
    follower.shutdownPeer();
    assertEquals(LoadBalancerClientCli.runDiscovery(connectionString, "/d2", D2_CONFIG_DEFAULT_PARTITION_DATA), 0);
  }

  public void testD2ConfigWithZKQuorumV3DegraderDefaultPartitionLeaderPeerDown() throws Exception
  {
View Full Code Here

Examples of com.linkedin.d2.quorum.ZKPeer.shutdownPeer()

  public void testD2ConfigWithZKQuorumV3DegraderDefaultPartitionLeaderPeerDown() throws Exception
  {
    setup();
    String connectionString = _quorum.getHosts();
    ZKPeer leader = _quorum.getQuorumLeader();
    leader.shutdownPeer();
    assertEquals(LoadBalancerClientCli.runDiscovery(connectionString, "/d2", D2_CONFIG_DEFAULT_PARTITION_DATA), 0);
  }

  public void testD2ConfigWithZKQuorumV3DegraderDefaultPartitionMultiplePeersDown() throws Exception
  {
View Full Code Here

Examples of com.linkedin.d2.quorum.ZKPeer.shutdownPeer()

  public void testD2ConfigWithZKQuorumV3DegraderCustomPartitionFollowerPeerDown() throws Exception
  {
    setup();
    String connectionString = _quorum.getHosts();
    ZKPeer follower = _quorum.getQuorumFollower();
    follower.shutdownPeer();
    assertEquals(LoadBalancerClientCli.runDiscovery(connectionString, "/d2", D2_CONFIG_DEFAULT_PARTITION_DATA), 0);
  }

  public void testD2ConfigWithZKQuorumV3DegraderCustomPartitionMultiplePeersDown() throws Exception
  {
View Full Code Here

Examples of com.linkedin.d2.quorum.ZKPeer.shutdownPeer()

  public void testD2ConfigWithZKQuorumV3DegraderCustomPartitionLeaderPeerDown() throws Exception
  {
    setup();
    String connectionString = _quorum.getHosts();
    ZKPeer leader = _quorum.getQuorumLeader();
    leader.shutdownPeer();
    assertEquals(LoadBalancerClientCli.runDiscovery(connectionString, "/d2", D2_CONFIG_DEFAULT_PARTITION_DATA), 0);
  }

  public void testD2ConfigWithZKQuorumV3DegraderDefaultPartitionInvalidHost() throws Exception
  {
View Full Code Here

Examples of com.linkedin.d2.quorum.ZKPeer.shutdownPeer()

  public void testD2WithQuorumFollowerPeerDown() throws Exception
  {
    setup();
    // Shutdown zk _quorum follower peer (non-leader member of a zk _quorum)
    ZKPeer follower = _quorum.getQuorumFollower();
    follower.shutdownPeer();
    // Assert requests are processed while follower goes down
    long start = System.currentTimeMillis();
    while (follower.getZKServer() != null && System.currentTimeMillis() < start + TIMEOUT)
    {
      assertQuorumProcessAllRequests(D2_CONFIG_DATA);
View Full Code Here

Examples of com.linkedin.d2.quorum.ZKPeer.shutdownPeer()

    // Shutdown zk _quorum leader peer
    ZKPeer peer = _quorum.getQuorumLeader();
    if (peer != null)
    {
      int peerId = peer.getId();
      peer.shutdownPeer();
      // Verify requests are processed while leader goes down
      long start = System.currentTimeMillis();
      while (_quorum.getQuorumLeader() != null && _quorum.getQuorumLeader().equals(peer) && System.currentTimeMillis() < (start + TIMEOUT))
      {
        assertQuorumProcessAllRequests(D2_CONFIG_DATA);
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.