lhotari opened a new pull request #9625:
URL: https://github.com/apache/pulsar/pull/9625


   ### Motivation
   
   The feedback loop in fixing and debugging integration tests is extremely 
slow at the moment because of the long time to build the 
pulsar-test-latest-version docker image and the images pulsar and pulsar-all 
that it depends on.
   
   Introduce a slim docker image which can run most integration tests.
   
   ### Modifications
   
   Adds a maven module for building `java-test-image`. 
   Produces a relatively slim 750MB image (+461MB to base image) which doesn't
     depend on building `pulsar` and `pulsar-all` images like the current 
`pulsar-test-latest-version image`.
   Image doesn't include CPP client, Python client, Pulsar SQL or Pulsar 
Connectors since most integration tests don't require those.
   
   Enables a lot quicker feedback loop when debugging and fixing integration 
tests
     locally since building the image takes less than 1.5 minutes on a modern 
laptop.
   
   Adding this image is also a preparation for speeding up CI where this slim 
image would be used to run the "core" integration tests which don't require CPP 
client, Python client, Pulsar SQL or Pulsar Connectors.
   
   Usage example to run single CLI integration test method against 
java-test-image:
   ```
   ./build/build_java_test_image.sh
   export PULSAR_TEST_IMAGE_NAME=apachepulsar/java-test-image:latest
   mvn -B -f tests/pom.xml test -DintegrationTests 
-DredirectTestOutputToFile=false -DtestRetryCount=0 -DfailIfNoTests=false 
-Dtest=CLITest#testCreateSubscriptionCommand
   ```
   
   Adds changes to the integration test infrastructure so that the name of the 
docker image to use can be passed in `PULSAR_TEST_IMAGE_NAME` environment 
variable.
   
   In addition, adds `skipSourceReleaseAssembly` maven property which can be 
used to skip building the `apache-pulsar-*-src.tar.gz` when it's not needed. 
This is to speed up building of the docker image. It's used in the provided 
`build/build_java_test_image.sh` script.
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to