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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to