Skip to content

Conversation

@karenc-bq
Copy link
Contributor

Summary

Add logs to flakey test so we can acquire more information when the test fails.

Description

Additional Reviewers

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

assertTrue(instanceIDs.size() > 0);
final String nextWriterId = instanceIDs.get(0);

LOGGER.info("currentConnectionObject: " + conn.unwrap(Connection.class));
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT:
is it something that could be displayed all in one line?
it looks like those are logs mostly for debugging purposes? shouldn't it be finer/finest instead of info?

() -> Messages.get(
"ClusterAwareReaderFailoverHandler.successfulReaderConnection",
new Object[] {this.newHost.getUrl()}));
LOGGER.fine("New reader connection object: " + conn);
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the goal/interest behind this log line?
Is the object supposed to have changed or remained? are we looking at any property on that object?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To look at the hashcode of this object and to compare it with the connection we get after failover in AuroraFailoverTest.

@karenc-bq karenc-bq force-pushed the test/add_logs_to_flakey_test branch from 29f6f0c to 2f3b1e7 Compare April 11, 2023 22:42
@karenc-bq karenc-bq merged commit 7b00497 into aws:main Apr 11, 2023
@karenc-bq karenc-bq deleted the test/add_logs_to_flakey_test branch April 11, 2023 23:40
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.

3 participants