Skip to content

Conversation

@absurdfarce
Copy link
Contributor

No description provided.


// Iterate over all known/supported protocol versions
logger_.add_critera("Key may not be empty");
logger_.add_critera("Password must not be null");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to match the message observed for the default C* version (3.11.6)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe leave the old criteria and add the new one? Then update the logger count check to a > 0? I don't know why this asserts a specific count...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I like that quite a bit better than my initial change. I'll update.

*/
Session session = connect_using_credentials(i, "", "");
ASSERT_EQ(session.connect_error_code(), CASS_ERROR_LIB_NO_HOSTS_AVAILABLE);
ASSERT_EQ(session.connect_error_code(), CASS_ERROR_SERVER_BAD_CREDENTIALS);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test was reporting this error rather than "no hosts available" and it seems more descriptive anyway


// Iterate over all known/supported protocol versions
logger_.add_critera("Key may not be empty");
logger_.add_critera("Authentication ID must not be null");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to above, update to match what's going on with 3.11.6


// Iterate over all known/supported protocol versions
logger_.add_critera("and/or password are incorrect");
logger_.add_critera("Password must not be null");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to above, update to match what's going on with 3.11.6

*/
Session session = connect_using_credentials(i, NULL, "pass");
ASSERT_EQ(session.connect_error_code(), CASS_ERROR_LIB_NO_HOSTS_AVAILABLE);
ASSERT_EQ(session.connect_error_code(), CASS_ERROR_SERVER_BAD_CREDENTIALS);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to above, "bad credentials" seems more correct here

Copy link
Contributor

@mpenick mpenick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing!

@mpenick
Copy link
Contributor

mpenick commented Nov 16, 2021

Look good locally:

[==========] Running 6 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 6 tests from AuthenticationTests
[ RUN      ] AuthenticationTests.Integration_Cassandra_ProtocolVersions
[       OK ] AuthenticationTests.Integration_Cassandra_ProtocolVersions (9427 ms)
[ RUN      ] AuthenticationTests.Integration_Cassandra_InvalidEmptyCredentials
[       OK ] AuthenticationTests.Integration_Cassandra_InvalidEmptyCredentials (2054 ms)
[ RUN      ] AuthenticationTests.Integration_Cassandra_InvalidNullUsernameCredentials
[       OK ] AuthenticationTests.Integration_Cassandra_InvalidNullUsernameCredentials (2392 ms)
[ RUN      ] AuthenticationTests.Integration_Cassandra_InvalidNullPasswordCredentials
[       OK ] AuthenticationTests.Integration_Cassandra_InvalidNullPasswordCredentials (3305 ms)
[ RUN      ] AuthenticationTests.Integration_Cassandra_BadCredentials
[       OK ] AuthenticationTests.Integration_Cassandra_BadCredentials (3663 ms)
[ RUN      ] AuthenticationTests.Integration_Cassandra_AuthenticatorSetErrorNull
[       OK ] AuthenticationTests.Integration_Cassandra_AuthenticatorSetErrorNull (4112 ms)
[----------] 6 tests from AuthenticationTests (24953 ms total)

[----------] Global test environment tear-down
[==========] 6 tests from 1 test case ran. (24953 ms total)
[  PASSED  ] 6 tests.

@absurdfarce absurdfarce merged commit c7472bf into master Nov 17, 2021
fsaporito pushed a commit to cloudian/cpp-driver that referenced this pull request May 9, 2023
Fix for AuthenticationTests against default C* version (3.11.6)
@absurdfarce absurdfarce deleted the integration_test_fixes branch October 29, 2025 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants