You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/11/20 03:25:29 UTC

[GitHub] [druid] asdf2014 commented on a change in pull request #11860: Improve README for integration test

asdf2014 commented on a change in pull request #11860:
URL: https://github.com/apache/druid/pull/11860#discussion_r753626940



##########
File path: integration-tests/README.md
##########
@@ -42,144 +42,169 @@ under Preferences > Resources > Advanced.)
 Also set the `DOCKER_IP`
 environment variable to localhost on your system, as follows:
 
-```
+```bash
 export DOCKER_IP=127.0.0.1
 ```
 
 Optionally, you can also set `APACHE_ARCHIVE_MIRROR_HOST` to override `https://archive.apache.org` host. This host is used to download archives such as hadoop and kafka during building docker images:
 
-```
+```bash
 export APACHE_ARCHIVE_MIRROR_HOST=https://example.com/remote-generic-repo
 ```
 
-## Running tests
+## Running tests againt auto brought up Docker containers
+
+> NOTE: This section describes how to start integration tests against docker containers which will be brought up automatically by following commands.
+If you want to buid docker images and run tests separately, see the next section.
 
 To run all tests from a test group using docker and mvn run the following command: 
-(list of test groups can be found at integration-tests/src/test/java/org/apache/druid/tests/TestNGGroup.java)
-```
-  mvn verify -P integration-tests -Dgroups=<test_group>
+(list of test groups can be found at `integration-tests/src/test/java/org/apache/druid/tests/TestNGGroup.java`)
+```bash
+mvn verify -P integration-tests -Dgroups=<test_group>
 ```
 
 To run only a single test using mvn run the following command:
-```
-  mvn verify -P integration-tests -Dgroups=<test_group> -Dit.test=<test_name>
+```bash
+mvn verify -P integration-tests -Dgroups=<test_group> -Dit.test=<test_name>
 ```
 The test group should always be set, as certain test setup and cleanup tasks are based on the test group. You can find
 the test group for a given test as an annotation in the respective test class.
 
 Add `-rf :druid-integration-tests` when running integration tests for the second time or later without changing
 the code of core modules in between to skip up-to-date checks for the whole module dependency tree.
 
-Integration tests can also be run with either Java 8 or Java 11 by adding -Djvm.runtime=# to mvn command, where #
+Integration tests can also be run with either Java 8 or Java 11 by adding `-Djvm.runtime=#` to mvn command, where `#`
 can either be 8 or 11.
 
-Druid's configuration (using Docker) can be overrided by providing -Doverride.config.path=<PATH_TO_FILE>. 
+Druid's configuration (using Docker) can be overrided by providing `-Doverride.config.path=<PATH_TO_FILE>`. 
 The file must contain one property per line, the key must start with `druid_` and the format should be snake case.
 Note that when bringing up docker containers through mvn and -Doverride.config.path is provided, additional
 Druid routers for security group integration test (permissive tls, no client auth tls, custom check tls) will not be started.   
 
-## Docker compose
+## Running tests against mannually brought up Docker containers
 
-There are a few different Docker compose yamls located in "docker" folder. Before you can run any of these, you must
-build the Docker images. See "Manually bringing up Docker containers and running tests" below.
+1. Build docker images.
+   
+   From root module run maven command, run the following command:
+   ```bash
+   mvn clean install -pl integration-tests -P integration-tests -Ddocker.run.skip=true -Dmaven.test.skip=true -Ddocker.build.hadoop=true
+   ```             
+   
+   > NOTE: -Ddocker.build.hadoop=true is optional if you don't run tests againt Hadoop.
 
-docker-compose.base.yml - Base file that defines all containers for integration test
+3. Choose a docker-compose file to start containers.

Review comment:
       The 3 should be 2, right




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org