kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 7462e7d19397bf4e7778c0cc0e7e01774325bfda60f97eb53da7e416da00d85d |
|---|---|
| Author | Andrew Tolbert <andrew.tolbert@datastax.com> · 2015-07-16 12:48 -05:00 |
| Committer | Andrew Tolbert <andrew.tolbert@datastax.com> · 2015-07-16 12:48 -05:00 |
| Parents | ada2b55e1ff7 |
2 files changed
modified driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java +8 −7
| @@ -449,13 +449,14 @@ | ||
| 449 | 449 | try { |
| 450 | 450 | ProtocolVersion protocolVersion = TestUtils.getDesiredProtocolVersion(); |
| 451 | 451 | |
| 452 | - ccmBridge = CCMBridge.builder("test-class") | |
| 453 | - .withoutNodes() | |
| 454 | - .notStarted() | |
| 455 | - .withCassandraConfiguration("enable_user_defined_functions", | |
| 456 | - // Only enable user defined functions if protocol version is >= 4. | |
| 457 | - Boolean.toString(protocolVersion.compareTo(ProtocolVersion.V4) >= 0)) | |
| 458 | - .build(); | |
| 452 | + CCMBridge.Builder builder = CCMBridge.builder("test-class") | |
| 453 | + .withoutNodes() | |
| 454 | + .notStarted(); | |
| 455 | + | |
| 456 | + if(protocolVersion.compareTo(ProtocolVersion.V4) >= 0) { | |
| 457 | + builder = builder.withCassandraConfiguration("enable_user_defined_functions", "true"); | |
| 458 | + } | |
| 459 | + ccmBridge = builder.build(); | |
| 459 | 460 | |
| 460 | 461 | ports = new int[5]; |
| 461 | 462 | for (int i = 0; i < 5; i++) { |
modified driver-core/src/test/java/com/datastax/driver/core/SchemaChangesTest.java +7 −6
| @@ -42,12 +42,13 @@ | ||
| 42 | 42 | |
| 43 | 43 | @BeforeClass(groups = "short") |
| 44 | 44 | public void setup() { |
| 45 | - ccm = CCMBridge.builder("schemaChangesTest") | |
| 46 | - .withNodes(1) | |
| 47 | - .withCassandraConfiguration("enable_user_defined_functions", | |
| 48 | - // Only enable user defined functions if protocol version is >= 4. | |
| 49 | - Boolean.toString(TestUtils.getDesiredProtocolVersion().compareTo(ProtocolVersion.V4) >= 0)) | |
| 50 | - .build(); | |
| 45 | + CCMBridge.Builder builder = CCMBridge.builder("schemaChangesTest") | |
| 46 | + .withNodes(1); | |
| 47 | + | |
| 48 | + if(TestUtils.getDesiredProtocolVersion().compareTo(ProtocolVersion.V4) >= 0) { | |
| 49 | + builder = builder.withCassandraConfiguration("enable_user_defined_functions", "true"); | |
| 50 | + } | |
| 51 | + ccm = builder.build(); | |
| 51 | 52 | |
| 52 | 53 | cluster = Cluster.builder().addContactPoint(CCMBridge.ipOfNode(1)).build(); |
| 53 | 54 | cluster2 = Cluster.builder().addContactPoint(CCMBridge.ipOfNode(1)).build(); |