Pull #17876: Fix PackageObjectFactoryTest before/after annotations#17876
Conversation
5e694cb to
b175de1
Compare
|
Nice catch. How did you find it? Please review CI failures, CI must be green. We probably need to add such imports to forbidden |
|
Instead of referencing of some old issue. |
b175de1 to
fcfe763
Compare
|
@romani thanks! re: CI failures - looks like my own stupid mistake. I misread the commit message instructions, and (wrongly!) thought they referred to the commit message subject, not the entire commit message. re: marking it with "Pull #17876:" - done. re: forbidding such imports - it looks like the |
Yes, please. I will be awesome to firbid all old junit classes, I surprised they are still available in class path |
Looking in to it. |
I take back my assessment of |
Follow up on #16500 - since
PackageObjectFactoryTestis executed using the JUnit Jupiter teset executor, theorg.junit.BeforeClassandorg.junit.AfterClassJUnit 4 annotations aren't picked up, and the methods annotated with them are never executed.This patch follows up on the work done in #16233 and replaces these annotations with
org.junit.jupiter.api.BeforeAllandorg.junit.jupiter.api.AfterAll, respectively, so that these methods are indeed executed as part of the test lifecycle.