280a0f7158
* Add sketch fetching framework * Refactor code to support sequential merge * Update worker sketch fetcher * Refactor sketch fetcher * Refactor sketch fetcher * Add context parameter and threshold to trigger sequential merge * Fix test * Add integration test for non sequential merge * Address review comments * Address review comments * Address review comments * Resolve maxRetainedBytes * Add new classes * Renamed key statistics information class * Rename fetchStatisticsSnapshotForTimeChunk function * Address review comments * Address review comments * Update documentation and add comments * Resolve build issues * Resolve build issues * Change worker APIs to async * Address review comments * Resolve build issues * Add null time check * Update integration tests * Address review comments * Add log messages and comments * Resolve build issues * Add unit tests * Add unit tests * Fix timing issue in tests |
||
---|---|---|
.. | ||
cases | ||
docs | ||
image | ||
tools | ||
.gitignore | ||
README.md |
README.md
Revised Integration Tests
This directory builds a Docker image for Druid, then uses that image, along with test configuration to run tests. This version greatly evolves the integration tests from the earlier form. See the History section for details.
Shortcuts
List of the most common commands once you're familiar with the framework. If you are new to the framework, see Quickstart for an explanation.
Build Druid
To make the text a bit simpler, define a variable for the standard settings:
export MAVEN_IGNORE=-P skip-static-checks,skip-tests -Dmaven.javadoc.skip=true
```bash
mvn clean package -P dist $MAVEN_IGNORE -T1.0C
Build the Test Image
cd $DRUID_DEV/integration-tests-ex/image
mvn install -P test-image $MAVEN_IGNORE
Run an IT from the Command Line
mvn verify -P IT-<category> -pl :druid-it-cases $MAVEN_IGNORE
Where <category>
is one of the test categories.
Or
cd $DRUID_DEV/integration-tests-ex/cases
mvn verify -P skip-static-checks,docker-tests,IT-<category> \
-Dmaven.javadoc.skip=true -DskipUTs=true \
-pl :druid-it-cases
Run an IT from the IDE
Start the cluster:
cd $DRUID_DEV/integration-tests-ex/cases
./cluster.sh up <category>
Where <category>
is one of the test categories. Then launch the
test as a JUnit test.
Contents
- Goals
- Quickstart
- Create a new test
- Maven configuration
- Travis integration
- Docker image
- Druid configuration
- Docker Compose configuration
- Test configuration
- Test structure
- Test runtime semantics
- Scripts
- Dependencies
- Debugging
Background information
- Next steps
- Test conversion - How to convert existing tests.
- History - Comparison with prior integration tests.
Goals
The goal of the present version is to simplify development.
- Speed up the Druid test image build by avoiding download of dependencies. (Instead, any such dependencies are managed by Maven and reside in the local build cache.)
- Use official images for dependencies to avoid the need to download, install, and manage those dependencies.
- Make it is easy to manually build the image, launch a cluster, and run a test against the cluster.
- Convert tests to JUnit so that they will easily run in your favorite IDE, just like other Druid tests.
- Use the actual Druid build from
distribution
so we know what is tested. - Leverage, don't fight, Maven.
- Run the integration tests easily on a typical development machine.
By meeting these goals, you can quickly:
- Build the Druid distribution.
- Build the Druid image. (< 1 minute)
- Launch the cluster for the particular test. (a few seconds)
- Run the test any number of times in your debugger.
- Clean up the test artifacts.
The result is that the fastest path to develop a Druid patch or feature is:
- Create a normal unit test and run it to verify your code.
- Create an integration test that double-checks the code in a live cluster.