Issue #16233: test execution is failing on non EN locales#16500
Conversation
|
|
||
| @AfterClass | ||
| public static void restoreLocale() { | ||
| Locale.setDefault(defaultLocale); |
There was a problem hiding this comment.
Is this required? To restore original locale .
Our test needs English locale to let messages in Input files to work properly.
There was a problem hiding this comment.
Hey @romani , I added the code to restore the original locale to maintain test isolation and prevent any side effects on other test cases that might rely on the system’s default locale. But if we are always using English and there are no dependencies on the system locale now or in the future, we can remove it. So should I remove it?
There was a problem hiding this comment.
We use to be locale based .
But after we migrated to Input based tests with messages inside, it becomes impossible, so we stick to EN locale.
Ok , let's keep it, it should not break anything, this should easier to help identify locale problems in other tests.
…otations Follow up on checkstyle#16500 - since PackageObjectFactoryTest is executed using the JUnit Jupiter teset executor, the `org.junit.BeforeClass` and `org.junit.AfterClass` JUnit 4 annotations aren't picked up, and the methods annotated with them are never executed. This patch follows up on the work done in checkstyle#16233 and replaces these annotations with `org.junit.jupiter.api.BeforeAll` and `org.junit.jupiter.api.AfterAll`, respectively, so that these methods are indeed executed as part of the test lifecycle.
…otations Follow up on checkstyle#16500 - since PackageObjectFactoryTest is executed using the JUnit Jupiter teset executor, the `org.junit.BeforeClass` and `org.junit.AfterClass` JUnit 4 annotations aren't picked up, and the methods annotated with them are never executed. This patch follows up on the work done in checkstyle#16233 and replaces these annotations with `org.junit.jupiter.api.BeforeAll` and `org.junit.jupiter.api.AfterAll`, respectively, so that these methods are indeed executed as part of the test lifecycle.
Solves : #16233
Reverted #16234 to verify