Skip to content

Enhance developer experience for debugging tests and add related README #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 13, 2022

Conversation

BewareMyPower
Copy link
Contributor

Motivation

When I ran python3 ./tests/pulsar_tests.py, I found some tests failed. However, when I went into the container that was started by ./build-support/pulsar-test-service-start.sh, the logs are incomplete because the immediate flush is disabled by default.

Finally I found the error is caused by the relative path in tests. The certs are under tests/test-conf directory, but pulsar_tests.py uses the test-conf/ relative path. Since tests/run-unit-tests.sh first goes to the tests directory before running the tests, CI works well. But a developer might just want to run a specific test from any possible directory, e.g.

python3 ./tests/pulsar_tests.py PulsarTest.test_tls_auth

Then it could fail and he cannot see complete logs.

Modifications

  • Modify immediateFlush to true
  • Use absolute path to represent test-conf/ in pulsar_tests.py
  • Add an initial README for quick start

### Motivation

When I ran `python3 ./tests/pulsar_tests.py`, I found some tests failed.
However, when I went into the container that was started by
`./build-support/pulsar-test-service-start.sh`, the logs are incomplete
because the immediate flush is disabled by default.

Finally I found the error is caused by the relative path in tests. The
certs are under `tests/test-conf` directory, but `pulsar_tests.py` uses
the `test-conf/` relative path. Since `tests/run-unit-tests.sh` first
goes to the `tests` directory before running the tests, CI works well.
But a developer might just want to run a specific test from any possible
directory, e.g.

```bash
python3 ./tests/pulsar_tests.py PulsarTest.test_tls_auth
```

Then it could fail and he cannot see complete logs.

### Modifications

- Modify `immediateFlush` to true
- Use absolute path to represent `test-conf/` in `pulsar_tests.py`
- Add an initial README for quick start
@BewareMyPower BewareMyPower added the documentation Improvements or additions to documentation label Oct 13, 2022
@BewareMyPower BewareMyPower self-assigned this Oct 13, 2022
@merlimat merlimat added this to the 3.0.0 milestone Oct 13, 2022
@merlimat merlimat merged commit dc8eaeb into apache:main Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants