A toolbox for a Pulsar Contributor.
Clone this repository to some parent directory, for example in $HOME/workspace-pulsar
.
Include the functions in your ~/.zshrc
or ~/.bashrc
file:
export PULSAR_CONTRIBUTOR_TOOLBOX=$HOME/workspace-pulsar/pulsar-contributor-toolbox
. $PULSAR_CONTRIBUTOR_TOOLBOX/functions/pulsar-contributor-toolbox-functions.sh
PULSAR_DEV_DIR=$HOME/workspace-pulsar/pulsar
This toolbox is currently supported on Linux and MacOS and zsh shell. The shell scripts have support for bash, but that is not actively tested and used.
All shell script functions are in the functions/pulsar-contributor-toolbox-functions.sh file.
Some highlights:
Runs a mvn test
command until it fails. This is useful for reproducing flaky test failures.
Example of running TopicReaderTest
ptbx_until_test_fails -Pcore-modules -pl pulsar-broker -Dtest=TopicReaderTest
Similar as ptbx_until_test_fails
, but logs the output to a file.
Example of running TopicReaderTest
ptbx_until_test_fails_with_logs -Pcore-modules -pl pulsar-broker -Dtest=TopicReaderTest
Runs a mvn test
command until it fails. The command is run within docker to limit CPU and memory resources.
This is supported only on a Linux host environment.
Some flaky tests fail only when running on limited CPU resources.
Consider using Multipass or Vagrant on Windows or macOS for running tests with limited resources.
Example of running TopicReaderTest
ptbx_until_test_fails_in_docker -Pcore-modules -pl pulsar-broker -Dtest=TopicReaderTest
Similar as ptbx_until_test_fails_in_docker
, but logs the output to a file.
Example of running TopicReaderTest
ptbx_until_test_fails_in_docker_with_logs -Pcore-modules -pl pulsar-broker -Dtest=TopicReaderTest