@@ -108,8 +108,10 @@ CASSANDRA_INTEGRATION_TEST_F(AuthenticationTests, ProtocolVersions) {
108
108
CASSANDRA_INTEGRATION_TEST_F (AuthenticationTests, InvalidEmptyCredentials) {
109
109
CHECK_FAILURE;
110
110
111
- // Iterate over all known/supported protocol versions
112
111
logger_.add_critera (" Key may not be empty" );
112
+ logger_.add_critera (" Password must not be null" );
113
+
114
+ // Iterate over all known/supported protocol versions
113
115
for (int i = CASS_LOWEST_SUPPORTED_PROTOCOL_VERSION; i <= CASS_HIGHEST_SUPPORTED_PROTOCOL_VERSION;
114
116
++i) {
115
117
/*
@@ -118,8 +120,8 @@ CASSANDRA_INTEGRATION_TEST_F(AuthenticationTests, InvalidEmptyCredentials) {
118
120
* a simple form. This test serves to characterize what is there presently.
119
121
*/
120
122
Session session = connect_using_credentials (i, " " , " " );
121
- ASSERT_EQ (session.connect_error_code (), CASS_ERROR_LIB_NO_HOSTS_AVAILABLE );
122
- ASSERT_EQ (logger_.count (), 2u );
123
+ ASSERT_EQ (session.connect_error_code (), CASS_ERROR_SERVER_BAD_CREDENTIALS );
124
+ ASSERT_GT (logger_.count (), 0u );
123
125
logger_.reset_count ();
124
126
}
125
127
}
@@ -139,8 +141,10 @@ CASSANDRA_INTEGRATION_TEST_F(AuthenticationTests, InvalidEmptyCredentials) {
139
141
CASSANDRA_INTEGRATION_TEST_F (AuthenticationTests, InvalidNullUsernameCredentials) {
140
142
CHECK_FAILURE;
141
143
142
- // Iterate over all known/supported protocol versions
143
144
logger_.add_critera (" Key may not be empty" );
145
+ logger_.add_critera (" Authentication ID must not be null" );
146
+
147
+ // Iterate over all known/supported protocol versions
144
148
for (int i = CASS_LOWEST_SUPPORTED_PROTOCOL_VERSION; i <= CASS_HIGHEST_SUPPORTED_PROTOCOL_VERSION;
145
149
++i) {
146
150
/*
@@ -149,8 +153,8 @@ CASSANDRA_INTEGRATION_TEST_F(AuthenticationTests, InvalidNullUsernameCredentials
149
153
* a simple form. This test serves to characterize what is there presently.
150
154
*/
151
155
Session session = connect_using_credentials (i, NULL , " pass" );
152
- ASSERT_EQ (session.connect_error_code (), CASS_ERROR_LIB_NO_HOSTS_AVAILABLE );
153
- ASSERT_EQ (logger_.count (), 2u );
156
+ ASSERT_EQ (session.connect_error_code (), CASS_ERROR_SERVER_BAD_CREDENTIALS );
157
+ ASSERT_GT (logger_.count (), 0u );
154
158
logger_.reset_count ();
155
159
}
156
160
}
@@ -170,8 +174,10 @@ CASSANDRA_INTEGRATION_TEST_F(AuthenticationTests, InvalidNullUsernameCredentials
170
174
CASSANDRA_INTEGRATION_TEST_F (AuthenticationTests, InvalidNullPasswordCredentials) {
171
175
CHECK_FAILURE;
172
176
173
- // Iterate over all known/supported protocol versions
174
177
logger_.add_critera (" and/or password are incorrect" );
178
+ logger_.add_critera (" Password must not be null" );
179
+
180
+ // Iterate over all known/supported protocol versions
175
181
for (int i = CASS_LOWEST_SUPPORTED_PROTOCOL_VERSION; i <= CASS_HIGHEST_SUPPORTED_PROTOCOL_VERSION;
176
182
++i) {
177
183
/*
@@ -181,7 +187,7 @@ CASSANDRA_INTEGRATION_TEST_F(AuthenticationTests, InvalidNullPasswordCredentials
181
187
*/
182
188
Session session = connect_using_credentials (i, " user" , NULL );
183
189
ASSERT_EQ (session.connect_error_code (), CASS_ERROR_SERVER_BAD_CREDENTIALS);
184
- ASSERT_GE (logger_.count (), 1u );
190
+ ASSERT_GT (logger_.count (), 0u );
185
191
logger_.reset_count ();
186
192
}
187
193
}
0 commit comments