kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | ccad81a3b795f7df6ac54fcdf4772d55113b7be0da945d5818b6df344416ad29 |
|---|---|
| Author | Clint Ascencio <clint.ascencio@datastax.com> · 2015-08-07 10:29 -05:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2015-08-09 20:19 +02:00 |
| Parents | 296c787d932c |
2 files changed
modified driver-core/src/test/java/com/datastax/driver/core/SCassandraCluster.java +16 −2
| @@ -98,6 +98,10 @@ | ||
| 98 | 98 | return activityClients.get(node - 1).retrievePreparedStatementExecutions(); |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | + public List<PreparedStatementPreparation> retrievePreparedStatementPreparations(int node) { | |
| 102 | + return activityClients.get(node - 1).retrievePreparedStatementPreparations(); | |
| 103 | + } | |
| 104 | + | |
| 101 | 105 | public void clearAllPrimes() { |
| 102 | 106 | for (PrimingClient primingClient : primingClients) |
| 103 | 107 | primingClient.clearAllPrimes(); |
| @@ -121,14 +125,24 @@ | ||
| 121 | 125 | if (scassandras.get(i).equals(toIgnore)) |
| 122 | 126 | continue; |
| 123 | 127 | InetAddress address = addresses.get(i); |
| 124 | - rows.add(ImmutableMap.<String, Object>builder() | |
| 128 | + Map<String, ?> row = ImmutableMap.<String, Object>builder() | |
| 125 | 129 | .put("peer", address) |
| 126 | 130 | .put("rpc_address", address) |
| 127 | 131 | .put("data_center", "datacenter1") |
| 128 | 132 | .put("rack", "rack1") |
| 129 | 133 | .put("release_version", "2.0.1") |
| 130 | 134 | .put("tokens", ImmutableSet.of(Long.toString(Long.MIN_VALUE + i))) |
| 131 | - .build()); | |
| 135 | + .build(); | |
| 136 | + | |
| 137 | + rows.add(row); | |
| 138 | + | |
| 139 | + String query = "SELECT * FROM system.peers WHERE peer='" + address.toString().substring(1) + "'"; | |
| 140 | + primingClient.prime( | |
| 141 | + PrimingRequest.queryBuilder() | |
| 142 | + .withQuery(query) | |
| 143 | + .withColumnTypes(SELECT_PEERS_COLUMN_TYPES) | |
| 144 | + .withRows(row) | |
| 145 | + .build()); | |
| 132 | 146 | } |
| 133 | 147 | primingClient.prime( |
| 134 | 148 | PrimingRequest.queryBuilder() |
modified pom.xml +1 −5
| @@ -60,11 +60,7 @@ | ||
| 60 | 60 | <testng.version>6.8.8</testng.version> |
| 61 | 61 | <assertj.version>1.7.0</assertj.version> |
| 62 | 62 | <mockito.version>1.10.8</mockito.version> |
| 63 | - <!-- | |
| 64 | - There are more recent versions of Scassandra but they require JDK 7, | |
| 65 | - our build is still using JDK 6. | |
| 66 | - --> | |
| 67 | - <scassandra.version>0.4.1</scassandra.version> | |
| 63 | + <scassandra.version>0.9.1</scassandra.version> | |
| 68 | 64 | <main.basedir>${project.basedir}</main.basedir> |
| 69 | 65 | </properties> |
| 70 | 66 |