Skip to content

Commit f95fd7d

Browse files
stamhankar999Michael Penick
authored andcommitted
CPP-443 - Support for protocol v5
* Force 3.10 and later C* versions to be tested with v5.
1 parent 0026f95 commit f95fd7d

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

test/integration_tests/src/test_utils.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,12 @@ MultipleNodesTest::MultipleNodesTest(unsigned int num_nodes_dc1,
244244
cass_cluster_set_max_connections_per_host(cluster, 4);
245245
cass_cluster_set_num_threads_io(cluster, 4);
246246
cass_cluster_set_max_concurrent_creation(cluster, 8);
247-
cass_cluster_set_protocol_version(cluster, protocol_version);
247+
if (version.major_version >= 3 && version.minor_version >= 10 &&
248+
protocol_version == CASS_HIGHEST_SUPPORTED_PROTOCOL_VERSION) {
249+
cass_cluster_set_use_beta_protocol_version(cluster, cass_true);
250+
} else {
251+
cass_cluster_set_protocol_version(cluster, protocol_version);
252+
}
248253
cass_cluster_set_use_randomized_contact_points(cluster, cass_false);
249254
}
250255

test/integration_tests/src/test_utils.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
#include "cassandra.h"
3838
#include "bridge.hpp"
39+
#include "constants.hpp"
3940

4041
#ifdef min
4142
#undef min
@@ -1169,7 +1170,7 @@ struct Value<CassDuration> {
11691170
*/
11701171
struct MultipleNodesTest {
11711172
MultipleNodesTest(unsigned int num_nodes_dc1, unsigned int num_nodes_dc2,
1172-
unsigned int protocol_version = 4, bool with_vnodes = false,
1173+
unsigned int protocol_version = CASS_HIGHEST_SUPPORTED_PROTOCOL_VERSION, bool with_vnodes = false,
11731174
bool is_ssl = false);
11741175

11751176
virtual ~MultipleNodesTest();
@@ -1182,7 +1183,7 @@ struct MultipleNodesTest {
11821183

11831184
struct SingleSessionTest : public MultipleNodesTest {
11841185
SingleSessionTest(unsigned int num_nodes_dc1, unsigned int num_nodes_dc2,
1185-
bool with_session = true, unsigned int protocol_version = 4,
1186+
bool with_session = true, unsigned int protocol_version = CASS_HIGHEST_SUPPORTED_PROTOCOL_VERSION,
11861187
bool with_vnodes = false, bool is_ssl = false);
11871188

11881189
virtual ~SingleSessionTest();

0 commit comments

Comments
 (0)