It is a good idea to run the Ozone Acceptance and Unit tests before committing your patch. The whole process takes around 20 minutes, including the time taken to build the Ozone tarball.
- Ensure you have the following tools installed on your development machine.
- Docker
- jq. On MacOS, this can be installed with homebrew using
brew install jq
- Robot Framework. On MacOS, this can be installed using
brew install robot-framework
- Build an Ozone tarball with:
mvn clean install package -Phdds -DskipTests=true -Dmaven.javadoc.skip=true -DskipShade -Pdist –Dtar
- Run the Tests.
- Acceptance Tests. This will launch docker containers, run tests, and create a report in the same directory named
report.html
. Open the report file in a browser and if the page background is green, we are good.cd hadoop-ozone/acceptance-test/
bash
- ./dev-support/bin/robot-all.sh
- HDDS Unit Tests.
cd hadoop-hdds
mvn test
- Ozone Unit Tests.
cd hadoop-ozone
mvn test
- Acceptance Tests. This will launch docker containers, run tests, and create a report in the same directory named
Look at the results and then commit the patch.
Troubleshooting
If the acceptance tests fail, retry the above steps running on a clean branch (without your changes). If they continue to fail then it is likely that docker containers did not start correctly. You should see error messages on the terminal.
Also try out the following:
- Ensure that the directory
./hadoop-dist/target/compose/ozone/
exists in your source tree after the build completes. - Go to
./hadoop-dist/target/compose/ozone/
and run 'docker-compose up
'. - Ensure that Ozone services start up correctly in the docker containers.
- If this step fails, check that the file
.env
exists and has a line like the following (the exact version may be different).HDDS_VERSION=0.2.1-SNAPSHOT
These steps were originally compiled by Anu Engineer (Apache ID aengineer).