The Avatica TCK is a framework to test the compatibilty between various versions of Avatica clients and servers.
The TCK is configured by a YAML file which specifies a TCK framework jar and a list of Avatica client and server versions. Each version must specify the path to a client jar, the URL of the server for that version, and a template for the JDBC url.
An example YAML configuration file is provided (example_config.yml) which can be used as a starting point for users to fill out. Most elements are straightforward to understand; however, it does require that you provide a URL to a running Avatica server for each version to be tested.
To make it easy to run a standalone Avatica server, an instance of the Avatica server running against an in-memory SQL database (HSQLDB) is provided starting in version 1.8.0. The
avatica-hsqldb-server-1.8.0-SNAPSHOT-shaded.jar artifact can be used to start an Avatica server on a random port (printed to the console).
java -jar avatica-hsqldb-server-1.8.0-SNAPSHOT-shaded.jar
For convenience in testing against earlier versions of Avatica, the following repository can be used to simplify building the same instance of a standalone HSQLDB-backed Avatica server https://github.com/joshelser/legacy-avatica-hsqldb-server
Follow the instructions in the README to build a standalone jar against a specific version of Calcite/Avatica which can be used as specified above.
A ruby script, test_runner.rb is provided which consumes the modified YAML configuration file. This script will first run each provided version against itself as a sanity check for the tests itself (as the scope of what is implemented in Avatica does change over time), and then enumerate all possible combinations of client and server version.
For example, if versions 1.6.0, 1.7.1 and 1.8.0-SNAPSHOT are defined in the YAML configuration file, the following identity tests will be run from client to server:
while the following tests will be run for cross-version compatibility:
Any errors encountered will be printed to the terminal. The final output of the script will be a summary of both the identity tests and the cross-version tests for easy consumption.