Elffuss BraidHub

kikocis/java-driver public

further updates for formatting issues
Changeset06b2eac624d26b648753252ee14952bc189c42c8def251c49e878ead0db43b29
AuthorGregBestland <Greg.Bestland@datastax.com> · 2017-02-27 10:14 -06:00
CommitterGregBestland <Greg.Bestland@datastax.com> · 2017-02-27 10:14 -06:00
Parents1e9ad4f86e72

Browse the files at this changeset

1 file changed

modified driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java +0 −21
@@ -15,7 +15,6 @@
1515 */
1616 package com.datastax.driver.core;
1717
18-
1918 import org.scassandra.Scassandra;
2019 import org.scassandra.http.client.BatchExecution;
2120 import org.scassandra.http.client.PreparedStatementExecution;
@@ -34,7 +33,6 @@
3433
3534 public class ConsistencyTest {
3635
37-
3836 private static final Logger logger = LoggerFactory.getLogger(ConsistencyTest.class);
3937 private ScassandraCluster sCluster;
4038
@@ -42,7 +40,6 @@
4240 public void setUp() {
4341 sCluster = ScassandraCluster.builder().withNodes(1).build();
4442 sCluster.init();
45-
4643 }
4744
4845 @AfterClass(groups = "short")
@@ -55,7 +52,6 @@
5552 clearActivityLog();
5653 }
5754
58-
5955 public void clearActivityLog() {
6056 for (Scassandra node : sCluster.nodes()) {
6157 node.activityClient().clearAllRecordedActivity();
@@ -75,10 +71,8 @@
7571 * as null.
7672 */
7773 public void checkSerialCLMatch(ConsistencyLevel expected, String received) {
78-
7974 if (expected.equals(ConsistencyLevel.SERIAL)) {
8075 assertNull(received);
81-
8276 } else {
8377 assertTrue(received.equals(expected.toString()));
8478 }
@@ -162,8 +156,6 @@
162156 String batchStateString = "batch_default_cl";
163157 BatchExecution batch = executeBatch(session, batchStateString, null, null);
164158 assertTrue(batch.getConsistency().equals(ConsistencyLevel.LOCAL_ONE.toString()));
165-
166-
167159 } finally {
168160 cluster.close();
169161 }
@@ -194,11 +186,9 @@
194186 String batchStateString = "batch_query_cl";
195187 BatchExecution batch = executeBatch(session, batchStateString, null, null);
196188 assertTrue(batch.getConsistency().equals(cl.toString()));
197-
198189 } finally {
199190 cluster.close();
200191 }
201-
202192 }
203193
204194 /**
@@ -230,7 +220,6 @@
230220 } finally {
231221 cluster.close();
232222 }
233-
234223 }
235224
236225 /**
@@ -247,7 +236,6 @@
247236 Cluster cluster = builder().withQueryOptions(new QueryOptions().setConsistencyLevel(cl_one)).build();
248237 try {
249238
250-
251239 Session session = cluster.connect();
252240
253241 //Check order of precedence for simple statements
@@ -274,7 +262,6 @@
274262 pse = executePrepared(session, prepareString, cl_all, null);
275263 assertTrue(pse.getConsistency().equals(cl_all.toString()));
276264
277-
278265 //Check order of precedence for batch statements
279266 //Construct unique batch statement with no CL defined.
280267 String batchString = "batch_opts_cl";
@@ -286,11 +273,9 @@
286273 batchString = "prep_stm_cl";
287274 batch = executeBatch(session, batchString, cl_all, null);
288275 assertTrue(batch.getConsistency().equals(cl_all.toString()));
289-
290276 } finally {
291277 cluster.close();
292278 }
293-
294279 }
295280
296281 /**
@@ -309,7 +294,6 @@
309294 Query clQuery = executeSimple(session, queryString, null, cl);
310295 checkSerialCLMatch(cl, clQuery.getSerialConsistency());
311296
312-
313297 //Check prepared statement CL
314298 String prepareString = "preapred_statement_serial_cl";
315299 PreparedStatementExecution pse = executePrepared(session, prepareString, null, null);
@@ -319,11 +303,9 @@
319303 String batchStateString = "batch_statement_serial_cl";
320304 BatchExecution batch = executeBatch(session, batchStateString, null, null);
321305 checkSerialCLMatch(cl, batch.getSerialConsistency());
322-
323306 } finally {
324307 cluster.close();
325308 }
326-
327309 }
328310
329311 /**
@@ -351,11 +333,8 @@
351333 String batchStateString = "batch_statement_serial_cl";
352334 BatchExecution batch = executeBatch(session, batchStateString, null, cl);
353335 checkSerialCLMatch(cl, batch.getSerialConsistency());
354-
355336 } finally {
356337 cluster.close();
357338 }
358-
359339 }
360-
361340 }