-
Notifications
You must be signed in to change notification settings - Fork 52
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
chore: refactor AuroraTestUtility #1252
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
482f5ad
test: update mysql and testcontainers dependencies to fix flaky tests
aaron-congo db91c85
fix: test if host is allowed using hostname equality
aaron-congo 6f31328
test: close topology monitors before each test
aaron-congo e277287
Add note about org.testcontainers dependencies requiring the same ver…
aaron-congo 3454081
catch ClusterTopologyMonitorImpl.createHost exceptions, make sure pro…
aaron-congo 515e2d7
wip
aaron-congo 83775e8
Address warnings
aaron-congo 0188dab
wip
aaron-congo fe81eb9
Rename TestEnvironment classes
aaron-congo 1cc6436
wip
aaron-congo 1eb072d
Rename auroraUtil to testUtil
aaron-congo 2ed579e
wip javadocs
aaron-congo 92a2a2b
Remove instances parameter from createCluster functions
aaron-congo b0f6236
Finish javadocs
aaron-congo ce05def
cleanup
aaron-congo 558fb00
Merge branch 'main' into test-utility
aaron-congo d0af9fd
Rename HostEnvironment and ContainerEnvironment back to TestEnvironment
aaron-congo 1adaa8d
Rename TestUtility back to AuroraTestUtility
aaron-congo 9990eab
Rename testUtil variable back to auroraUtil
aaron-congo 98a1b7f
Merge branch 'main' into test-utility
aaron-congo 435626b
Fix checkstyle
aaron-congo 1bbe5ee
cleanup
aaron-congo c486682
Fix mistake in formation of test host suffix
aaron-congo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -569,8 +569,8 @@ public void test_failoverReaderToWriter_setReadOnlyTrueFalse() | |
|
||
ProxyHelper.enableAllConnectivity(); | ||
|
||
// During failover above some of readers have been tried to connect to and failed since they were not | ||
// available. We should expect that some of readers in topology are marked as UNAVAILABLE. | ||
// During failover above some of the readers have been tried to connect to and failed since they were not | ||
// available. We should expect that some of the readers in topology are marked as UNAVAILABLE. | ||
// The following code reset node availability and make them AVAILABLE. | ||
// That is important for further steps. | ||
TestPluginServiceImpl.clearHostAvailabilityCache(); | ||
|
@@ -857,7 +857,7 @@ public void test_pooledConnection_differentUsers() throws SQLException { | |
|
||
assertThrows( | ||
HikariPool.PoolInitializationException.class, () -> { | ||
try (final Connection conn = DriverManager.getConnection( | ||
try (final Connection ignored = DriverManager.getConnection( | ||
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. just fixing an intellij warning here |
||
ConnectionStringHelper.getWrapperUrl(), wrongUserRightPasswordProps)) { | ||
// Do nothing (close connection automatically) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Before these changes, the new instance was added to the TestEnvironment in a convoluted way: an earlier call to AuroraTestUtility would pass in the TestEnvironment instance list, which the class would then assign to an internal instance variable. Then, in this call, the instance list would be updated. In this PR we removed the internal instance variable. Should I change the method signature to require the TestEnvironment instance list to be passed in so that we can update it inside the function instead of relying on callers to update it themselves? It would be convenient but it also would be a side effect of calling the function