Repository navigation
test: add ReactiveOpenGaussTableManagementTest - #27
hezhangjian wants to merge 2 commits into
Conversation
f6a489e to
df8973b
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new test class ReactiveOpenGaussTableManagementTest to test reactive OpenGauss table management functionality. The changes include Docker client updates, new test configuration, and improvements to the reactive OpenGauss implementation.
- Updates Docker client configuration to use newer HTTP client implementation
- Creates a comprehensive test suite for reactive OpenGauss table management operations
- Refactors OpenGauss table management to remove unused dependencies
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| OpenGaussContainer.java | Updates Docker client initialization to use DefaultDockerClientConfig and ApacheDockerHttpClient |
| table-facade-test-common/pom.xml | Changes dependency from docker-java-api to docker-java-transport-httpclient5 |
| ReactiveOpenGaussTestConfig.java | Adds new test configuration for reactive OpenGauss testing with R2DBC setup |
| ReactiveOpenGaussTableManagementTest.java | Implements comprehensive tests for table existence, creation, and deletion operations |
| ReactiveOpenGaussTableManagement.java | Removes unused TableFacadeProperties.OpenGauss dependency |
| table-facade-spring-reactive-opengauss/pom.xml | Adds PostgreSQL R2DBC dependencies and fixes logging exclusion |
| TableFacadeReactiveAutoConfiguration.java | Updates constructor call to match refactored ReactiveOpenGaussTableManagement |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| ConnectionFactoryOptions options = ConnectionFactoryOptions.builder() | ||
| .option(DRIVER, "postgresql") | ||
| .option(HOST, "localhost") | ||
| .option(PORT, 5432) |
There was a problem hiding this comment.
The hardcoded port 5432 should use the actual container port from openGaussContainer.getPort() to ensure tests work correctly when the container uses a different port.
| "localhost", | ||
| 5432, |
There was a problem hiding this comment.
The hardcoded values should use openGaussContainer.getHost() and openGaussContainer.getPort() to ensure the R2DBC URL points to the correct container endpoint.
| private static OpenGaussContainer container; | ||
|
|
||
| @Autowired | ||
| private DatabaseClient databaseClient; | ||
|
|
||
| @Autowired | ||
| private ReactiveTableManagement tableManagement; | ||
|
|
||
| @AfterAll | ||
| void stopContainer() { | ||
| container.stopContainer(); | ||
| } | ||
|
|
There was a problem hiding this comment.
The container field is declared but never initialized or used. It should either be removed or properly initialized and used in the stopContainer() method.
| private static OpenGaussContainer container; | |
| @Autowired | |
| private DatabaseClient databaseClient; | |
| @Autowired | |
| private ReactiveTableManagement tableManagement; | |
| @AfterAll | |
| void stopContainer() { | |
| container.stopContainer(); | |
| } | |
| @Autowired | |
| private DatabaseClient databaseClient; | |
| @Autowired | |
| private ReactiveTableManagement tableManagement; |
Signed-off-by: Zhangjian He <hezhangjian97@gmail.com>
df8973b to
22fe50a
Compare
No description provided.