Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

The Reactive MSSQL Client

Documentation:

Developers

Testing

By default, the test suite runs SQL Server in a container using TestContainers.

The container database binds to an arbitrary port to avoid conflicts. Nevertheless, you can force the usage of the standard SQL Server port (1433) with a flag:

mvn test -DcontainerFixedPort

Testing with different SQL Server versions

You can test with different SQL Server versions by using Maven profiles:

mvn test -P MSSQL-2019-latest
mvn test -P MSSQL-2022-latest
mvn test -P MSSQL-2025-latest

Or by passing the version property directly:

mvn test -Dmssql-container.version=2019-latest

The following versions are supported:

  • 2019-latest

  • 2022-latest

  • 2025-latest (default)

Testing with an external database

You can start external database instances:

cd docker
docker compose up

Then run tests against it:

mvn test \
  -Dconnection.uri=sqlserver://SA:A_Str0ng_Required_Password@localhost:1433 \
  -Dtls.connection.uri=sqlserver://SA:A_Str0ng_Required_Password@localhost:1435 \
  -Dforce.encryption.connection.uri=sqlserver://SA:A_Str0ng_Required_Password@localhost:1437 \
  -Dstrict.encryption.connection.uri=sqlserver://SA:A_Str0ng_Required_Password@localhost:1439?encrypt=strict
  • connection.uri: connection uri of the database to use for all other tests

  • tls.connection.uri: connection uri of the database to use for MSSQLEncryptionTest

  • force.encryption.connection.uri: connection uri of the database to use for MSSQLForcedEncryptionTest

  • strict.encryption.connection.uri: connection uri of the database to use for MSSQLStrictEncryptionTest