File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
core/src/test/java/com/datastax/oss/driver/internal/core
manual/core/native_protocol Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 24
24
import static com .datastax .oss .driver .internal .core .DefaultProtocolFeature .DATE_TYPE ;
25
25
import static com .datastax .oss .driver .internal .core .DefaultProtocolFeature .SMALLINT_AND_TINYINT_TYPES ;
26
26
import static org .assertj .core .api .Assertions .assertThat ;
27
+ import static org .assertj .core .api .Assertions .assertThatThrownBy ;
27
28
28
29
import com .datastax .dse .driver .api .core .DseProtocolVersion ;
29
30
import com .datastax .dse .driver .api .core .metadata .DseNodeProperties ;
@@ -51,6 +52,15 @@ public void should_find_version_by_name() {
51
52
assertThat (registry .fromName ("DSE_V1" )).isEqualTo (DseProtocolVersion .DSE_V1 );
52
53
}
53
54
55
+
56
+ @ Test
57
+ public void should_fail_to_find_version_by_name_different_case () {
58
+ assertThatThrownBy (() -> registry .fromName ("v4" )).isInstanceOf (IllegalArgumentException .class );
59
+ assertThatThrownBy (() -> registry .fromName ("dse_v1" )).isInstanceOf (IllegalArgumentException .class );
60
+ assertThatThrownBy (() -> registry .fromName ("dDSE_v1" )).isInstanceOf (IllegalArgumentException .class );
61
+ assertThatThrownBy (() -> registry .fromName ("dse_v1" )).isInstanceOf (IllegalArgumentException .class );
62
+ }
63
+
54
64
@ Test
55
65
public void should_downgrade_if_lower_version_available () {
56
66
Optional <ProtocolVersion > downgraded = registry .downgrade (V4 );
Original file line number Diff line number Diff line change @@ -62,12 +62,14 @@ the [configuration](../configuration/):
62
62
```
63
63
datastax-java-driver {
64
64
advanced.protocol {
65
- # The V in the version parameter must be capitalized
66
65
version = V3
67
66
}
68
67
}
69
68
```
70
69
70
+ Note that the protocol version you specify above is case sensitive so make sure to only use uppercase letters.
71
+ "V3" is correct, "v3" is not.
72
+
71
73
If you force a version that is too high for the server, you'll get an error:
72
74
73
75
```
You can’t perform that action at this time.
0 commit comments