Support database aliases in R2DBC - #2599
Conversation
# Conflicts: # modules/r2dbc/src/testFixtures/java/org/testcontainers/r2dbc/AbstractR2DBCDatabaseContainerTest.java
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this is a mistake, please reply to this comment to keep it open. If there isn't one already, a PR to fix or at least reproduce the problem in a test case will always help us get back on track to tackle this. |
|
|
||
| private static final String ACCEPTANCE_FILE_NAME = "container-license-acceptance.txt"; | ||
|
|
||
| static final Set<String> ACCEPTED_IMAGE_NAMES = new HashSet<>(); |
There was a problem hiding this comment.
| static final Set<String> ACCEPTED_IMAGE_NAMES = new HashSet<>(); | |
| final Set<String> ACCEPTED_IMAGE_NAMES = new HashSet<>(); |
Since we use @UtilityClass, all static modifiers in the class can be omitted.
| import org.junit.runner.Description; | ||
| import org.junit.runners.model.Statement; | ||
|
|
||
| public class MockLicenseAcceptanceRule implements TestRule { |
There was a problem hiding this comment.
IMO this is not a mock, but more a way to programmatically accept licences, maybe LicenseAcceptanceRule would fit better (just dropping the mock)?
Also renaming MockTestcontainersConfigurationRule to something like TestcontainersConfigurationRolebackRule accordingly would make sense? (stumbled upon this during review and took a bit to understand the idea behind the class)
| } | ||
| return future.thenApply(it -> { | ||
| return ConnectionFactories.find( | ||
| return ConnectionFactories.get( |
There was a problem hiding this comment.
Could be replaced by a lambda expression.
|
Some proposed refactorings submitted in #3019 |
|
This branch fails on |
| Properties properties = TestcontainersConfiguration.getInstance().getProperties(); | ||
| return properties.getProperty( | ||
| driverPropertyName(options.getRequiredValue(ConnectionFactoryOptions.DRIVER)), | ||
| originalDriver |
There was a problem hiding this comment.
| originalDriver | |
| options.getRequiredValue(ConnectionFactoryOptions.DRIVER) |
This will fix failing TestcontainersR2DBCConnectionFactoryTest.failsOnUnknownProvider() .
Fix is already included in #3019
No description provided.