Commit 202770e
committed
Remove ambiguity in Cassandra and DSE versions
Motivation:
Originally CCMBridge was developed targeting running Apache Cassandra
clusters using CCM. Over time this has changed to also work with
DataStax Enterprise. There are some cases where there was ambiguity
with regards to whether the DSE or Cassandra version was used. This
attempts to fix this.
Also, there were some places where the globally configured Cassandra/DSE
version was used (passed in via -Dcassandra.version) instead of a
locally configured one for a particular test. This commit also fixes
this.
In Addition, TestUtils.getDesiredProtocolVersion was made available to
determine the ProtocolVersion to use based on the globally configured
Cassandra version. This functionality has been moved to CCMAccess, so
one can get the ProtocolVersion tied to the version of Cassandra used
scoped to the test.
Finally, update default cassandra.version used in tests to 3.10.
Modifications:
Break out CCMAccess.getVersion() into two methods,
CCMAccess.getCassandraVersion() and CCMAccess.getDSEVersion(). If DSE
is not configured getDSEVersion() returns null, if it is configured
getCassandraVersion() returns the mapped version of Cassandra from DSE.
Move TestUtils.getDesiredProtocolVersion to CCMAccess.
Rename CCMBridge.CASSANDRA_VERSION to CCMBridge.INPUT_CASSANDRA_VERSION.
Add CCMBridge.CASSANDRA_VERSION_NUMBER and CCMBridge.DSE_VERSION_NUMBER.
Rename CCMBridge.getCassandraVersion() and getDSEVersion() to
CCMBridge.getGlobalCassandraVersion() and
CCMBridge.getGlobalDSEVersion(). These methods return VersionNumber
instead of String.
Result:
Ambiguity removed between Cassandra and DSE versions. Annotations that
call out CCM remain unchanged.1 parent 32f6abd commit 202770e
27 files changed
Lines changed: 357 additions & 368 deletions
File tree
- driver-core/src/test/java/com/datastax/driver/core
- driver-tests/osgi/src/test/java/com/datastax/driver/osgi
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
| 209 | + | |
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
Lines changed: 26 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
36 | 37 | | |
37 | | - | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
42 | 50 | | |
43 | 51 | | |
44 | 52 | | |
| |||
236 | 244 | | |
237 | 245 | | |
238 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
239 | 262 | | |
0 commit comments