Skip to content

TestsDescription

GangCheng edited this page Jan 21, 2024 · 2 revisions

Test environment

  • Test run with testcontainer framework, so you should have a docker runtime in running machine.
  • Branch 3.x use toolchains maven plugin to compile with multiple JDKs. The toolchains configuration file is toolchains.xml
  • The toolchains maven plugin use sdkman to auto manager JDK versions.
  • I only test with Terminus JDK

R2dbc Driver Version

  • Branch 2.x:
groupId artifactId version
org.mariadb r2dbc-mariadb 1.1.2
org.postgresql r2dbc-postgresql 0.9.2.RELEASE
io.asyncer r2dbc-mysql 0.9.5
io.r2dbc r2dbc-mssql 0.9.0.RELEASE
  • Branch 3.x:
groupId artifactId version
org.mariadb r2dbc-mariadb 1.1.4
org.postgresql r2dbc-postgresql 1.0.3.RELEASE
io.asyncer r2dbc-mysql 1.0.5
io.r2dbc r2dbc-mssql 1.0.2.RELEASE
com.oracle.database.r2dbc oracle-r2dbc 1.2.0

Test Explanation

  • mybatis-r2dbc

    ├── java
    │   └── pro
    │       └── chenggang
    │           └── project
    │               └── reactive
    │                   └── mybatis
    │                       └── support
    │                           ├── MybatisR2dbcBaseTests.java # Base Test for environment configrations
    │                           ├── common
    │                           │   ├── entity # common entities
    │                           │   │   ├── Dept.java
    │                           │   │   ├── Emp.java
    │                           │   │   ├── Subject.java
    │                           │   │   ├── SubjectContent.java
    │                           │   │   ├── SubjectData.java
    │                           │   │   └── extend
    │                           │   │       ├── DeptWithEmpList.java # one to many mapping entity
    │                           │   │       ├── EmpWithDept.java  # one to one mapping entity
    │                           │   │       └── SubjectWithSubjectData.java # one to many mapping entity
    │                           │   ├── mapper # common mapper
    │                           │   │   ├── DeptMapper.java
    │                           │   │   ├── EmpMapper.java
    │                           │   │   ├── SubjectDataMapper.java
    │                           │   │   ├── SubjectMapper.java
    │                           │   │   └── dynamic
    │                           │   │       ├── DeptDynamicMapper.java
    │                           │   │       ├── DeptDynamicSqlSupport.java
    │                           │   │       ├── EmpDynamicMapper.java
    │                           │   │       ├── EmpDynamicSqlSupport.java
    │                           │   │       ├── SubjectDataDynamicMapper.java
    │                           │   │       ├── SubjectDataDynamicSqlSupport.java
    │                           │   │       ├── SubjectDynamicMapper.java
    │                           │   │       └── SubjectDynamicSqlSupport.java
    │                           │   ├── option # common enum definiton
    │                           │   │   └── SubjectDataAnEnum.java
    │                           │   └── testcontainers # testcontainer initializtions
    │                           │       ├── DatabaseInitialization.java
    │                           │       ├── MariadbTestContainerInitialization.java
    │                           │       ├── MysqlTestContainerInitialization.java
    │                           │       ├── OracleTestContainerInitialization.java
    │                           │       ├── PostgresqlTestContainerInitialization.java
    │                           │       ├── SqlServerTestContainerInitialization.java
    │                           │       └── support
    │                           │           └── ScriptRunner.java # customized sql script runner for changing `DELIMITER` in `init-script` sql file
    │                           └── r2dbc
    │                               ├── binding # r2dbc binding tests
    │                               │   ├── BindingMapperTests.java
    │                               │   ├── BindingSimpleTests.java
    │                               │   ├── MybatisR2dbcXmlConfigTests.java
    │                               │   ├── MysqlConnectionFactoryOptionsConfigurer.java
    │                               │   ├── MysqlConnectionPoolConfigurationConfigurer.java
    │                               │   └── PostgresqlConnectionFactoryOptionsConfigurer.java
    │                               ├── execution  # r2dbc execution tests
    │                               │   ├── procedure # the tests related to procedure
    │                               │   │   ├── ProcedureMapper.java
    │                               │   │   ├── ProcedureMapperTests.java
    │                               │   │   └── SimpleRowProcedureData.java
    │                               │   ├── query
    │                               │   │   ├── dynamic # the tests related to `mybatis-dynamic-sql`
    │                               │   │   │   ├── DynamicQueryMapper.java
    │                               │   │   │   └── DynamicQueryMapperTests.java
    │                               │   │   ├── many # the tests related to query with many results
    │                               │   │   │   ├── ManyQueryMapper.java
    │                               │   │   │   └── ManyQueryMapperTests.java
    │                               │   │   └── simple # the tests related to query with simple result
    │                               │   │       ├── SimpleQueryMapper.java
    │                               │   │       └── SimpleQueryMapperTests.java
    │                               │   ├── transaction # the tests related to transaction
    │                               │   │   ├── delete # the tests related to delete
    │                               │   │   │   ├── DeleteMapper.java
    │                               │   │   │   └── DeleteMapperTest.java
    │                               │   │   ├── insert # the tests related to insert
    │                               │   │   │   ├── InsertMapper.java
    │                               │   │   │   └── InsertMapperTest.java
    │                               │   │   ├── parallel # the tests related to parallel running
    │                               │   │   │   └── ParallelTransactionTest.java
    │                               │   │   └── update # the tests related to update
    │                               │   │       ├── UpdateMapper.java
    │                               │   │       └── UpdateMapperTest.java
    │                               │   └── type
    │                               │       ├── adapter # the tests related to `R2dbcTypeHandlerAdapter`
    │                               │       │   ├── AdapterMapper.java
    │                               │       │   └── AdapterMapperTests.java
    │                               │       ├── basic # the tests related to basic type handling
    │                               │       │   ├── BasicTypeMapper.java
    │                               │       │   └── BasicTypeMapperTests.java
    │                               │       └── enums # the tests related to enums
    │                               │           ├── EnumRelatedMapper.java
    │                               │           ├── EnumRelatedMapperTests.java
    │                               │           ├── SpecificEnumType.java
    │                               │           └── SpecificEnumTypeR2dbcTypeHandlerAdapter.java
    │                               └── support # the tests related to procedure
    │                                   └── ProxyInstanceFactoryTest.java
    └── resources
        ├── MybatisR2dbcConfig.xml # the mybatis xml config file
        ├── container-license-acceptance.txt
        ├── logback.xml # the log configuration
        ├── mybatis-config.properties # the mybatis config properties in config xml 
        ├── pro
        │   └── chenggang
        │       └── project
        │           └── reactive
        │               └── mybatis
        │                   └── support
        │                       ├── common # # the mapper xml associated with mapper interface
        │                       │   ├── DeptMapper.xml
        │                       │   ├── EmpMapper.xml
        │                       │   ├── SubjectDataMapper.xml
        │                       │   └── SubjectMapper.xml
        │                       └── r2dbc
        │                           └── execution
        │                               ├── procedure
        │                               │   └── ProcedureMapper.xml
        │                               ├── query
        │                               │   ├── many
        │                               │   │   └── ManyQueryMapper.xml
        │                               │   └── simple
        │                               │       └── SimpleQueryMapper.xml
        │                               ├── transaction
        │                               │   ├── delete
        │                               │   │   └── DeleteMapper.xml
        │                               │   ├── insert
        │                               │   │   └── InsertMapper.xml
        │                               │   └── update
        │                               │       └── UpdateMapper.xml
        │                               └── type
        │                                   ├── adapter
        │                                   │   └── AdapterMapper.xml
        │                                   ├── basic
        │                                   │   └── BasicTypeMapper.xml
        │                                   └── enums
        │                                       └── EnumRelatedMapper.xml
        └── sql-script # the database init sql script
            ├── init_mariadb.sql
            ├── init_mssql.sql
            ├── init_mysql.sql
            ├── init_oracle.sql
            └── init_postgresql.sql
  • mybatis-r2dbc-spring

    ├── java
    │   └── pro
    │       └── chenggang
    │           └── project
    │               └── reactive
    │                   └── mybatis
    │                       └── support
    │                           └── r2dbc
    │                               └── spring
    │                                   ├── application
    │                                   │   ├── MybatisR2dbcApplication.java # the main spring application
    │                                   │   ├── configuration
    │                                   │   │   └── ApplicationConfiguration.java # the extra configuration
    │                                   │   ├── mapper # mapper interfaces
    │                                   │   │   ├── query
    │                                   │   │   │   ├── dynamic
    │                                   │   │   │   │   └── DynamicQueryMapper.java
    │                                   │   │   │   ├── many
    │                                   │   │   │   │   └── ManyQueryMapper.java
    │                                   │   │   │   └── simple
    │                                   │   │   │       └── SimpleQueryMapper.java
    │                                   │   │   ├── repository
    │                                   │   │   │   └── SimpleQueryRepository.java
    │                                   │   │   ├── transaction
    │                                   │   │   │   ├── delete
    │                                   │   │   │   │   └── DeleteMapper.java
    │                                   │   │   │   ├── insert
    │                                   │   │   │   │   └── InsertMapper.java
    │                                   │   │   │   └── update
    │                                   │   │   │       └── UpdateMapper.java
    │                                   │   │   └── type
    │                                   │   │       ├── adapter
    │                                   │   │       │   └── AdapterMapper.java
    │                                   │   │       ├── basic
    │                                   │   │       │   └── BasicTypeMapper.java
    │                                   │   │       └── enums
    │                                   │   │           ├── EnumRelatedMapper.java
    │                                   │   │           ├── SpecificEnumType.java
    │                                   │   │           └── SpecificEnumTypeR2dbcTypeHandlerAdapter.java
    │                                   │   └── service # the service
    │                                   │       ├── ApplicationService.java
    │                                   │       ├── DynamicRoutingService.java
    │                                   │       └── impl
    │                                   │           ├── ApplicationServiceImpl.java
    │                                   │           └── DynamicRoutingServiceImpl.java
    │                                   ├── common
    │                                   │   ├── entity # the common entities
    │                                   │   │   ├── Dept.java
    │                                   │   │   ├── Emp.java
    │                                   │   │   ├── Subject.java
    │                                   │   │   ├── SubjectContent.java
    │                                   │   │   ├── SubjectData.java
    │                                   │   │   └── extend
    │                                   │   │       ├── DeptWithEmpList.java
    │                                   │   │       ├── EmpWithDept.java
    │                                   │   │       └── SubjectWithSubjectData.java
    │                                   │   ├── mapper # the common mapper interface
    │                                   │   │   ├── DeptMapper.java
    │                                   │   │   ├── EmpMapper.java
    │                                   │   │   ├── SubjectDataMapper.java
    │                                   │   │   ├── SubjectMapper.java
    │                                   │   │   └── dynamic
    │                                   │   │       ├── DeptDynamicMapper.java
    │                                   │   │       ├── DeptDynamicSqlSupport.java
    │                                   │   │       ├── EmpDynamicMapper.java
    │                                   │   │       ├── EmpDynamicSqlSupport.java
    │                                   │   │       ├── SubjectDataDynamicMapper.java
    │                                   │   │       ├── SubjectDataDynamicSqlSupport.java
    │                                   │   │       ├── SubjectDynamicMapper.java
    │                                   │   │       └── SubjectDynamicSqlSupport.java
    │                                   │   ├── option # the common enum
    │                                   │   │   └── SubjectDataAnEnum.java
    │                                   │   └── testcontainers # the test container initialization
    │                                   │       ├── DatabaseInitialization.java
    │                                   │       ├── MariadbTestContainerInitialization.java
    │                                   │       ├── MysqlTestContainerInitialization.java
    │                                   │       ├── OracleTestContainerInitialization.java
    │                                   │       ├── PostgresqlTestContainerInitialization.java
    │                                   │       ├── SqlServerTestContainerInitialization.java
    │                                   │       └── support # the customized sql script runner
    │                                   │           └── ScriptRunner.java
    │                                   └── test
    │                                       ├── MybatisR2dbcApplicationTests.java # the standard spring application test 
    │                                       ├── MybatisR2dbcBaseTests.java # the standard base test
    │                                       ├── MybatisR2dbcRoutingApplicationTests.java # the spring application test with dynamic routing database
    │                                       ├── MybatisR2dbcXmlConfigApplicationTests.java # the spring application test with parsing mybatis xml config file
    │                                       ├── config # extra test configs
    │                                       │   ├── MysqlConnectionFactoryOptionsConfigurer.java
    │                                       │   └── PostgresqlConnectionFactoryOptionsConfigurer.java
    │                                       ├── mapper # test mapper interfaces
    │                                       │   ├── query
    │                                       │   │   ├── dynamic
    │                                       │   │   │   └── DynamicQueryMapperTests.java
    │                                       │   │   ├── many
    │                                       │   │   │   └── ManyQueryMapperTests.java
    │                                       │   │   └── simple
    │                                       │   │       └── SimpleQueryMapperTests.java
    │                                       │   ├── repository
    │                                       │   │   └── SimpleQueryRepositoryTests.java
    │                                       │   ├── transaction
    │                                       │   │   ├── delete
    │                                       │   │   │   └── DeleteMapperTest.java
    │                                       │   │   ├── insert
    │                                       │   │   │   └── InsertMapperTest.java
    │                                       │   │   ├── parallel
    │                                       │   │   │   └── ParallelTransactionTest.java
    │                                       │   │   └── update
    │                                       │   │       └── UpdateMapperTest.java
    │                                       │   └── type
    │                                       │       ├── adapter
    │                                       │       │   └── AdapterMapperTests.java
    │                                       │       ├── basic
    │                                       │       │   └── BasicTypeMapperTests.java
    │                                       │       └── enums
    │                                       │           ├── EnumOrdinalRelatedMapperTests.java
    │                                       │           └── EnumRelatedMapperTests.java
    │                                       └── service # the test services
    │                                           ├── ApplicationServiceTests.java
    │                                           └── DynamicRoutingServiceTests.java
    └── resources
        ├── MybatisR2dbcConfig.xml # the mybatis xml config file
        ├── application-routing.yml # the spring boot yaml config file with dynamic routing database configuration 
        ├── application-standard.yml # the spring boot yaml config file with standard configuration 
        ├── application-xml-config.yml # the spring boot yaml config file with mybatis xml parsing configuration 
        ├── container-license-acceptance.txt
        ├── logback-spring.xml
        ├── mapper # the mapper xml file associated with mapper interface
        │   ├── common
        │   │   ├── DeptMapper.xml
        │   │   ├── EmpMapper.xml
        │   │   ├── SubjectDataMapper.xml
        │   │   └── SubjectMapper.xml
        │   ├── query
        │   │   ├── many
        │   │   │   └── ManyQueryMapper.xml
        │   │   └── simple
        │   │       └── SimpleQueryMapper.xml
        │   ├── repository
        │   │   └── SimpleQueryRepository.xml
        │   ├── transaction
        │   │   ├── delete
        │   │   │   └── DeleteMapper.xml
        │   │   ├── insert
        │   │   │   └── InsertMapper.xml
        │   │   └── update
        │   │       └── UpdateMapper.xml
        │   └── type
        │       ├── adapter
        │       │   └── AdapterMapper.xml
        │       ├── basic
        │       │   └── BasicTypeMapper.xml
        │       └── enums
        │           └── EnumRelatedMapper.xml
        ├── mybatis-config.properties
        ├── sql-script the database init sql script
        │   ├── init_mssql.sql
        │   ├── init_mysql.sql
        │   ├── init_oracle.sql
        │   └── init_postgresql.sql