cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ifesdjeen <...@git.apache.org>
Subject [GitHub] cassandra pull request #275: 14727
Date Wed, 26 Sep 2018 17:45:45 GMT
Github user ifesdjeen commented on a diff in the pull request:

    https://github.com/apache/cassandra/pull/275#discussion_r220628704
  
    --- Diff: test/unit/org/apache/cassandra/service/WriteResponseHandlerTransientTest.java
---
    @@ -173,9 +173,15 @@ public void checkPendingReplicasAreNotFiltered()
         private static void assertSpeculationReplicas(ReplicaPlan.ForTokenWrite expected,
EndpointsForToken replicas, Predicate<InetAddressAndPort> livePredicate)
         {
             ReplicaPlan.ForTokenWrite actual = getSpeculationContext(replicas, livePredicate);
    -        Assert.assertTrue(Iterables.elementsEqual(expected.pending(), actual.pending()));
    -        Assert.assertTrue(Iterables.elementsEqual(expected.live(), actual.live()));
    -        Assert.assertTrue(Iterables.elementsEqual(expected.contacts(), actual.contacts()));
    +        assertEquals(expected.pending(), actual.pending());
    +        assertEquals(expected.live(), actual.live());
    +        assertEquals(expected.contacts(), actual.contacts());
    +    }
    +
    +    private static void assertEquals(ReplicaCollection<?> a, ReplicaCollection<?>
b)
    +    {
    +        if (!Iterables.elementsEqual(a, b))
    +            Assert.assertTrue(a + " vs " + b, false);
    --- End diff --
    
    we might want to consolidate this with `assertMultimapEqualsIgnoreOrder`


---

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


Mime
View raw message