Skip to content

Commit b60d05f

Browse files
Michael Feromikefero
authored andcommitted
test: Correcting issue with execution profile test
* SpeculativeExecutionPolicy would fail when using beta protocol v5 on Cassandra v3.10.0+ during the function creation.
1 parent 51bf09c commit b60d05f

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

gtests/src/integration/integration.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Integration::Integration()
5353
, is_ccm_start_node_individually_(false)
5454
, is_session_requested_(true)
5555
, is_test_chaotic_(false)
56+
, is_beta_protocol_(true)
5657
, protocol_version_(CASS_HIGHEST_SUPPORTED_PROTOCOL_VERSION)
5758
, create_keyspace_query_("")
5859
, start_time_(0ull) {
@@ -343,7 +344,7 @@ test::driver::Cluster Integration::default_cluster(bool is_with_default_contact_
343344
}
344345
if (server_version_ >= "3.10" &&
345346
protocol_version_ == CASS_HIGHEST_SUPPORTED_PROTOCOL_VERSION) {
346-
cluster.with_beta_protocol(true);
347+
cluster.with_beta_protocol(is_beta_protocol_);
347348
} else {
348349
cluster.with_protocol_version(protocol_version_);
349350
}

gtests/src/integration/integration.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,13 @@ class Integration : public testing::Test {
276276
* destroyed
277277
*/
278278
bool is_test_chaotic_;
279+
/**
280+
* Flag to indicate if the beta protocol should be enabled. True if beta
281+
* protocol should be enabled (Cassandra must be >= v3.10.0); false
282+
* otherwise.
283+
* (DEFAULT: true)
284+
*/
285+
bool is_beta_protocol_;
279286
/**
280287
* Workload to apply to the cluster
281288
*/

gtests/src/integration/tests/test_exec_profile.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class ExecutionProfileTest : public Integration {
3030
, skip_base_execution_profile_(false) {
3131
replication_factor_ = 2;
3232
number_dc1_nodes_ = 2;
33+
is_beta_protocol_ = false; // Issue with beta protocol v5 and functions on Cassandra v3.10.0+
3334
}
3435

3536
void SetUp() {

0 commit comments

Comments
 (0)