Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ public ReaderFailoverResult call() {
() -> 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.

return new ReaderFailoverResult(conn, this.newHost, true);
} catch (SQLException e) {
pluginService.setAvailability(newHost.asAliases(), HostAvailability.NOT_AVAILABLE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,14 @@ public void test_DataSourceWriterConnection_BasicFailover()
assertTrue(instanceIDs.size() > 0);
final String nextWriterId = instanceIDs.get(0);

LOGGER.fine("currentConnectionObject: " + conn.unwrap(Connection.class));
LOGGER.fine("initialWriterInstanceInfo endpoint: " + initialWriterInstanceInfo.getEndpoint());
LOGGER.fine("currentConnectionId: " + currentConnectionId);
LOGGER.fine("nextWriterId: " + nextWriterId);
LOGGER.fine("nominatedWriterId: " + nominatedWriterId);

assertNotEquals(initialWriterInstanceInfo.getInstanceId(), currentConnectionId);
assertEquals(nextWriterId, currentConnectionId);
assertEquals(nominatedWriterId, currentConnectionId);

assertTrue(conn.isValid(IS_VALID_TIMEOUT));
}
Expand Down
1 change: 1 addition & 0 deletions wrapper/src/test/resources/logging-test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ integration.container.aurora.postgres.AuroraPostgresBaseTest.level=FINEST
integration.refactored.level=FINEST
integration.refactored.container.tests.ReadWriteSplittingPerformanceTest.level=FINEST
integration.refactored.host.TestEnvironment.level=FINEST
integration.refactored.container.tests.AuroraFailoverTest.level=FINEST