-
Notifications
You must be signed in to change notification settings - Fork 292
Various integration test fixes #520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -108,8 +108,10 @@ CASSANDRA_INTEGRATION_TEST_F(AuthenticationTests, ProtocolVersions) { | |
| CASSANDRA_INTEGRATION_TEST_F(AuthenticationTests, InvalidEmptyCredentials) { | ||
| CHECK_FAILURE; | ||
|
|
||
| // Iterate over all known/supported protocol versions | ||
| logger_.add_critera("Key may not be empty"); | ||
| logger_.add_critera("Password must not be null"); | ||
|
|
||
| // Iterate over all known/supported protocol versions | ||
| for (int i = CASS_LOWEST_SUPPORTED_PROTOCOL_VERSION; i <= CASS_HIGHEST_SUPPORTED_PROTOCOL_VERSION; | ||
| ++i) { | ||
| /* | ||
|
|
@@ -118,8 +120,8 @@ CASSANDRA_INTEGRATION_TEST_F(AuthenticationTests, InvalidEmptyCredentials) { | |
| * a simple form. This test serves to characterize what is there presently. | ||
| */ | ||
| Session session = connect_using_credentials(i, "", ""); | ||
| ASSERT_EQ(session.connect_error_code(), CASS_ERROR_LIB_NO_HOSTS_AVAILABLE); | ||
| ASSERT_EQ(logger_.count(), 2u); | ||
| ASSERT_EQ(session.connect_error_code(), CASS_ERROR_SERVER_BAD_CREDENTIALS); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| ASSERT_GT(logger_.count(), 0u); | ||
| logger_.reset_count(); | ||
| } | ||
| } | ||
|
|
@@ -139,8 +141,10 @@ CASSANDRA_INTEGRATION_TEST_F(AuthenticationTests, InvalidEmptyCredentials) { | |
| CASSANDRA_INTEGRATION_TEST_F(AuthenticationTests, InvalidNullUsernameCredentials) { | ||
| CHECK_FAILURE; | ||
|
|
||
| // Iterate over all known/supported protocol versions | ||
| logger_.add_critera("Key may not be empty"); | ||
| logger_.add_critera("Authentication ID must not be null"); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
| for (int i = CASS_LOWEST_SUPPORTED_PROTOCOL_VERSION; i <= CASS_HIGHEST_SUPPORTED_PROTOCOL_VERSION; | ||
| ++i) { | ||
| /* | ||
|
|
@@ -149,8 +153,8 @@ CASSANDRA_INTEGRATION_TEST_F(AuthenticationTests, InvalidNullUsernameCredentials | |
| * a simple form. This test serves to characterize what is there presently. | ||
| */ | ||
| Session session = connect_using_credentials(i, NULL, "pass"); | ||
| ASSERT_EQ(session.connect_error_code(), CASS_ERROR_LIB_NO_HOSTS_AVAILABLE); | ||
| ASSERT_EQ(logger_.count(), 2u); | ||
| ASSERT_EQ(session.connect_error_code(), CASS_ERROR_SERVER_BAD_CREDENTIALS); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to above, "bad credentials" seems more correct here |
||
| ASSERT_GT(logger_.count(), 0u); | ||
| logger_.reset_count(); | ||
| } | ||
| } | ||
|
|
@@ -170,8 +174,10 @@ CASSANDRA_INTEGRATION_TEST_F(AuthenticationTests, InvalidNullUsernameCredentials | |
| CASSANDRA_INTEGRATION_TEST_F(AuthenticationTests, InvalidNullPasswordCredentials) { | ||
| CHECK_FAILURE; | ||
|
|
||
| // Iterate over all known/supported protocol versions | ||
| logger_.add_critera("and/or password are incorrect"); | ||
| logger_.add_critera("Password must not be null"); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
| for (int i = CASS_LOWEST_SUPPORTED_PROTOCOL_VERSION; i <= CASS_HIGHEST_SUPPORTED_PROTOCOL_VERSION; | ||
| ++i) { | ||
| /* | ||
|
|
@@ -181,7 +187,7 @@ CASSANDRA_INTEGRATION_TEST_F(AuthenticationTests, InvalidNullPasswordCredentials | |
| */ | ||
| Session session = connect_using_credentials(i, "user", NULL); | ||
| ASSERT_EQ(session.connect_error_code(), CASS_ERROR_SERVER_BAD_CREDENTIALS); | ||
| ASSERT_GE(logger_.count(), 1u); | ||
| ASSERT_GT(logger_.count(), 0u); | ||
| logger_.reset_count(); | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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...There was a problem hiding this comment.
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.