testng icon indicating copy to clipboard operation
testng copied to clipboard

Changed onAfterClass to run after @AfterClass

Open RSXEnthusiast opened this issue 3 years ago • 3 comments

Fixes #2796 - Listener's onAfterClass is called before @AfterClass configuration methods are executed.

Did you remember to?

  • [x] Add test case(s)
  • [x] Update CHANGES.txt
  • [x] Auto applied styling via ./gradlew autostyleApply

RSXEnthusiast avatar Oct 10 '22 21:10 RSXEnthusiast

Hi,

Thanks for the help but tests are failing.

A behavior change like that cannot be done without giving a way to rollback it. Otherwise, it could be seen as a breaking change.

Please, see my comment on the issue because we have to define the global expectation first.

juherr avatar Oct 11 '22 04:10 juherr

Tests need to be fixed

That's another cause for concern, and why I think this change might break existing users.

cbeust avatar Oct 11 '22 04:10 cbeust

Hi! Looks like the issue with tests was formatting, hopefully fixed next run.

RSXEnthusiast avatar Oct 11 '22 14:10 RSXEnthusiast

The change is good and may be the new default behavior. But please, add a way to configure the previous behavior for users who want it: we have complains on every behavior change. If you want, you can add a warning message when previous behavior is enabled.

juherr avatar Oct 30 '22 14:10 juherr