Skip to content

Commit 4fed103

Browse files
muzarskiwprzytula
authored andcommitted
IT: adjust and enable RetryPolicy execution profile test
1 parent bcb5f09 commit 4fed103

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ SCYLLA_TEST_FILTER := $(subst ${SPACE},${EMPTY},ClusterTests.*\
4545
:TimestampTests.Integration_Cassandra_MonotonicTimestampGenerator\
4646
:ExecutionProfileTest.Integration_Cassandra_RoundRobin\
4747
:ExecutionProfileTest.Integration_Cassandra_TokenAwareRouting\
48-
:ExecutionProfileTest.Integration_Cassandra_RetryPolicy\
4948
:ExecutionProfileTest.Integration_Cassandra_SpeculativeExecutionPolicy\
5049
:DCExecutionProfileTest.Integration_Cassandra_DCAware\
5150
:ControlConnectionTests.Integration_Cassandra_TopologyChange\
@@ -107,7 +106,6 @@ CASSANDRA_TEST_FILTER := $(subst ${SPACE},${EMPTY},ClusterTests.*\
107106
:TimestampTests.Integration_Cassandra_MonotonicTimestampGenerator\
108107
:ExecutionProfileTest.Integration_Cassandra_RoundRobin\
109108
:ExecutionProfileTest.Integration_Cassandra_TokenAwareRouting\
110-
:ExecutionProfileTest.Integration_Cassandra_RetryPolicy\
111109
:ExecutionProfileTest.Integration_Cassandra_SpeculativeExecutionPolicy\
112110
:DCExecutionProfileTest.Integration_Cassandra_DCAware\
113111
:ControlConnectionTests.Integration_Cassandra_TopologyChange\

tests/src/integration/tests/test_exec_profile.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,10 @@ CASSANDRA_INTEGRATION_TEST_F(ExecutionProfileTest, RetryPolicy) {
632632
CHECK_FAILURE;
633633

634634
// Create a logger criteria for retry policy validation
635-
logger_.add_critera("Ignoring unavailable error");
635+
// Provided execution profile uses cl THREE, while we have only two nodes.
636+
logger_.add_critera("Retrying on the next target; "
637+
"Error: Database returned an error: "
638+
"Not enough nodes are alive to satisfy required consistency level");
636639

637640
// Execute a simple query without assigned profile
638641
Statement statement(default_select_all());
@@ -645,8 +648,9 @@ CASSANDRA_INTEGRATION_TEST_F(ExecutionProfileTest, RetryPolicy) {
645648

646649
// Execute a simple query with assigned profile
647650
statement.set_execution_profile("retry_policy");
648-
result = session_.execute(statement);
649-
ASSERT_EQ(CASS_OK, result.error_code());
651+
// Don't expect CASS_OK.
652+
result = session_.execute(statement, false);
653+
ASSERT_EQ(CASS_ERROR_SERVER_UNAVAILABLE, result.error_code());
650654
ASSERT_EQ(1u, logger_.count());
651655
}
652656

0 commit comments

Comments
 (0)