Hi devs,
I recently discovered a bad issue regarding the automatic retrials of
failed tests with TestNG.

Basically we are using a feature from TestNG that tries to recover a failed
test and repeats the execution.
The fact is that TestNG is not properly cleaning up the env and the second
execution runs in a polluted environment, making the test useless.

Other than that the failed execution is reported as "Skip"

I have a patch that sets testRetryCount to 0, instead of the default of 1.

In the PR you can find for elements
https://github.com/apache/pulsar/pull/9043

In my opinion if we want to rerun tests we should use the builtin
maven-surefire-plugin mechanism rerunFailingTestCount (but it is only
available with JUnit).

Also setting testRetryCount to 0 leaves the decision to the developer
whether to leverage or not this feature, personally I spent a lot of time
trying to understand what was going on.

Thoughts ?

Enrico

Reply via email to