Elffuss BraidHub

kikocis/java-driver public

Update tests to account for errors now including full socket address.
Changeset3fbb08c92aab34e467c2f88e150049788e254529daaa9982612317ce7c53fd6c
AuthorAndrew Tolbert <andrew.tolbert@datastax.com> · 2016-06-28 16:31 -05:00
CommitterAndrew Tolbert <andrew.tolbert@datastax.com> · 2016-06-28 16:31 -05:00
Parents8f204f38907d

Browse the files at this changeset

5 files changed

modified driver-core/src/test/java/com/datastax/driver/core/policies/CustomRetryPolicyIntegrationTest.java +2 −2
@@ -88,7 +88,7 @@
8888 fail("expected an OperationTimedOutException");
8989 } catch (OperationTimedOutException e) {
9090 assertThat(e.getMessage()).isEqualTo(
91- String.format("[%s] Timed out waiting for server response", host1.getAddress())
91+ String.format("[%s] Timed out waiting for server response", host1.getSocketAddress())
9292 );
9393 }
9494 assertOnRequestErrorWasCalled(1, OperationTimedOutException.class);
@@ -131,7 +131,7 @@
131131 fail("expected a TransportException");
132132 } catch (TransportException e) {
133133 assertThat(e.getMessage()).isEqualTo(
134- String.format("[%s] Connection has been closed", host1.getAddress())
134+ String.format("[%s] Connection has been closed", host1.getSocketAddress())
135135 );
136136 }
137137 assertOnRequestErrorWasCalled(1, TransportException.class);
modified driver-core/src/test/java/com/datastax/driver/core/policies/DefaultRetryPolicyIntegrationTest.java +3 −3
@@ -187,9 +187,9 @@
187187 .hasOnlyElementsOfType(OperationTimedOutException.class)
188188 .extractingResultOf("getMessage")
189189 .containsOnlyOnce(
190- String.format("[%s] Timed out waiting for server response", host1.getAddress()),
191- String.format("[%s] Timed out waiting for server response", host2.getAddress()),
192- String.format("[%s] Timed out waiting for server response", host3.getAddress())
190+ String.format("[%s] Timed out waiting for server response", host1.getSocketAddress()),
191+ String.format("[%s] Timed out waiting for server response", host2.getSocketAddress()),
192+ String.format("[%s] Timed out waiting for server response", host3.getSocketAddress())
193193 );
194194 }
195195 assertOnRequestErrorWasCalled(3, OperationTimedOutException.class);
modified driver-core/src/test/java/com/datastax/driver/core/policies/DowngradingConsistencyRetryPolicyIntegrationTest.java +3 −3
@@ -383,9 +383,9 @@
383383 .hasOnlyElementsOfType(OperationTimedOutException.class)
384384 .extractingResultOf("getMessage")
385385 .containsOnlyOnce(
386- String.format("[%s] Timed out waiting for server response", host1.getAddress()),
387- String.format("[%s] Timed out waiting for server response", host2.getAddress()),
388- String.format("[%s] Timed out waiting for server response", host3.getAddress())
386+ String.format("[%s] Timed out waiting for server response", host1.getSocketAddress()),
387+ String.format("[%s] Timed out waiting for server response", host2.getSocketAddress()),
388+ String.format("[%s] Timed out waiting for server response", host3.getSocketAddress())
389389 );
390390 }
391391 assertOnRequestErrorWasCalled(3, OperationTimedOutException.class);
modified driver-core/src/test/java/com/datastax/driver/core/policies/FallthroughRetryPolicyIntegrationTest.java +2 −2
@@ -96,7 +96,7 @@
9696 Fail.fail("expected an OperationTimedOutException");
9797 } catch (OperationTimedOutException e) {
9898 assertThat(e.getMessage()).isEqualTo(
99- String.format("[%s] Timed out waiting for server response", host1.getAddress())
99+ String.format("[%s] Timed out waiting for server response", host1.getSocketAddress())
100100 );
101101 }
102102 assertOnRequestErrorWasCalled(1, OperationTimedOutException.class);
@@ -139,7 +139,7 @@
139139 Fail.fail("expected a TransportException");
140140 } catch (TransportException e) {
141141 assertThat(e.getMessage()).isEqualTo(
142- String.format("[%s] Connection has been closed", host1.getAddress())
142+ String.format("[%s] Connection has been closed", host1.getSocketAddress())
143143 );
144144 }
145145 assertOnRequestErrorWasCalled(1, TransportException.class);
modified driver-core/src/test/java/com/datastax/driver/core/policies/IdempotenceAwareRetryPolicyIntegrationTest.java +2 −2
@@ -87,7 +87,7 @@
8787 fail("expected an OperationTimedOutException");
8888 } catch (OperationTimedOutException e) {
8989 assertThat(e.getMessage()).isEqualTo(
90- String.format("[%s] Timed out waiting for server response", host1.getAddress())
90+ String.format("[%s] Timed out waiting for server response", host1.getSocketAddress())
9191 );
9292 }
9393 assertOnRequestErrorWasCalled(1, OperationTimedOutException.class);
@@ -179,7 +179,7 @@
179179 Fail.fail("expected a TransportException");
180180 } catch (TransportException e) {
181181 assertThat(e.getMessage()).isEqualTo(
182- String.format("[%s] Connection has been closed", host1.getAddress())
182+ String.format("[%s] Connection has been closed", host1.getSocketAddress())
183183 );
184184 }
185185 assertOnRequestErrorWasCalled(1, TransportException.class);