cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jolynch <...@git.apache.org>
Subject [GitHub] cassandra pull request #212: Rework the wait for healthy logic to count down...
Date Wed, 07 Nov 2018 22:09:42 GMT
Github user jolynch commented on a diff in the pull request:

    https://github.com/apache/cassandra/pull/212#discussion_r231696993
  
    --- Diff: test/unit/org/apache/cassandra/net/StartupClusterConnectivityCheckerTest.java
---
    @@ -36,13 +36,34 @@
     import org.apache.cassandra.gms.Gossiper;
     import org.apache.cassandra.gms.HeartBeatState;
     import org.apache.cassandra.locator.InetAddressAndPort;
    +import org.apache.cassandra.utils.FBUtilities;
     
     import static org.apache.cassandra.net.async.OutboundConnectionIdentifier.ConnectionType.SMALL_MESSAGE;
     
     public class StartupClusterConnectivityCheckerTest
     {
    -    private StartupClusterConnectivityChecker connectivityChecker;
    +    private StartupClusterConnectivityChecker localQuorumConnectivityChecker;
    +    private StartupClusterConnectivityChecker globalQuorumConnectivityChecker;
    +    private StartupClusterConnectivityChecker noopChecker;
    +    private StartupClusterConnectivityChecker zeroWaitChecker;
    +
    +    private static final int NUM_PER_DC = 6;
         private Set<InetAddressAndPort> peers;
    +    private Set<InetAddressAndPort> peersA;
    +    private Set<InetAddressAndPort> peersAMinusLocal;
    +    private Set<InetAddressAndPort> peersB;
    +    private Set<InetAddressAndPort> peersC;
    +
    +    private String getDatacenter(InetAddressAndPort endpoint)
    +    {
    +        if (peersA.contains(endpoint))
    +            return "datacenterA";
    +        if (peersB.contains(endpoint))
    +            return "datacenterB";
    +        else if (peersC.contains(endpoint))
    +            return "datacenterC";
    +        return "NA";
    --- End diff --
    
    Right, so it'll fail fast, done.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Mime
View raw message