Elffuss BraidHub

kikocis/java-driver public

Removed insertion-order dependent check for JAVA-511

The test used containsExactly assertion which assumes that the elements
appear in order.  This is not possible due to the collection
implementation and has to be replaced by containsOnly, which ignores
insertion order.
Changeseta2c74e8c3319fec15c3ca029a21720c11c723d5ad229ef8d6a174e315ded0e51
AuthorPierre Laporte <pierre@pingtimeout.fr> · 2014-10-24 17:01 +02:00
CommitterPierre Laporte <pierre@pingtimeout.fr> · 2014-10-24 17:02 +02:00
Parentsf3d4bfbe8473

Browse the files at this changeset

1 file changed

modified driver-core/src/test/java/com/datastax/driver/core/policies/DCAwareRoundRobinPolicyTest.java +2 −2
@@ -90,7 +90,7 @@
9090 Host host1 = TestUtils.findHost(cluster, 1);
9191 Host host2 = TestUtils.findHost(cluster, 2);
9292
93- assertThat(policy.initHosts).containsExactly(host1, host2);
93+ assertThat(policy.initHosts).containsOnly(host1, host2);
9494
9595 assertThat(logs.get())
9696 .contains("Some contact points don't match local data center");
@@ -148,7 +148,7 @@
148148
149149 assertEquals(policy.getLocalDc(), providedLocalDc);
150150
151- assertThat(policy.initHosts).containsExactly(host1, host2);
151+ assertThat(policy.initHosts).containsOnly(host1, host2);
152152
153153 assertThat(logs.get())
154154 .contains("Some contact points don't match local data center");