[
https://issues.apache.org/jira/browse/LANG-1127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14526987#comment-14526987
]
ASF GitHub Bot commented on LANG-1127:
--------------------------------------
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...
> Create a base test for the time package, which sets and resets default
> Locales and TimeZones
> --------------------------------------------------------------------------------------------
>
> Key: LANG-1127
> URL: https://issues.apache.org/jira/browse/LANG-1127
> Project: Commons Lang
> Issue Type: Test
> Components: lang.time.*
> Reporter: Benedikt Ritter
> Assignee: Charles Honton
> Fix For: Patch Needed
>
>
> We have a lot of problems due to Locale dependent tests. I propose to create
> a base test class with a setup and teardown method which set and reset
> default locale and time zone. All other tests should inherit from this base
> test class so that they don't have to fiddle around with default settings.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)