Github user britter commented on the pull request:
https://github.com/apache/commons-lang/pull/76#issuecomment-98803478
Hello @chonton,
very good feedback, thank you!
> 1. Allow tests to run in parallel. This will probably requires some sort
of synchronization to allow only one tests at a time to change default TimeZone
or Locale.
Good point. Should be possible by wrapping the code in the apply method
with some synchronization logic.
> 2. Apply the rule to individual test methods instead of to all methods in
a test class. Perhaps this could be done by creating annotation(s) which enable
the Rule. I am thinking of something like SwitchDefaults(locale="locale_name",
timezone="timezone_name").
This is already possible by calling explicitly the setLocale method on the
TestLocale instance. The idea is to set up a default for all tests and only
switch it for tests when needed. However this doesn't make much sense in the
light of parallel test execution...
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---