You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by neykov <gi...@git.apache.org> on 2014/10/10 12:38:05 UTC

[GitHub] incubator-brooklyn pull request: Fix the locale so tests are deter...

GitHub user neykov opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/235

    Fix the locale so tests are deterministic.

    Pulled out of https://github.com/apache/incubator-brooklyn/pull/211 (after merging with https://github.com/apache/incubator-brooklyn/pull/220) to fast track the merge to master.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/neykov/incubator-brooklyn fix/windows-tests-20141010

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-brooklyn/pull/235.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #235
    
----
commit 23a10a18de2553e5e8cf0c512ed0891aa0e6084d
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Date:   2014-10-10T10:31:27Z

    Fix the locale so tests are deterministic.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Fix the locale so tests are deter...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-brooklyn/pull/235


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Fix the locale so tests are deter...

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/235#issuecomment-59187781
  
    Great; merging.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Fix the locale so tests are deter...

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/235#issuecomment-58855552
  
    Changed to @BeforeMethod since the calls could be interleaved between different tests.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Fix the locale so tests are deter...

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/235#issuecomment-58749005
  
    Thanks @neykov - looks good. Only the one comment about changing setUp from `@beforeMethod` to `@beforeClass`.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Fix the locale so tests are deter...

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/235#discussion_r18741455
  
    --- Diff: core/src/test/java/brooklyn/util/text/TemplateProcessorTest.java ---
    @@ -21,17 +21,33 @@
     import static org.testng.Assert.assertEquals;
     
     import org.testng.Assert;
    +import org.testng.annotations.AfterClass;
    +import org.testng.annotations.BeforeClass;
     import org.testng.annotations.Test;
     
     import brooklyn.entity.BrooklynAppUnitTestSupport;
     import brooklyn.entity.proxying.EntitySpec;
     import brooklyn.event.basic.DependentConfiguration;
    +import brooklyn.test.FixedLocaleTest;
     import brooklyn.test.entity.TestApplication;
     import brooklyn.test.entity.TestEntity;
     
     import com.google.common.collect.ImmutableMap;
     
     public class TemplateProcessorTest extends BrooklynAppUnitTestSupport {
    +    private FixedLocaleTest localeFix = new FixedLocaleTest();
    +
    +    @BeforeClass
    +    public void setUp() throws Exception {
    +        super.setUp();
    +        localeFix.setUp();
    +    }
    +
    +    @AfterClass
    +    public void tearDown() throws Exception {
    +        super.tearDown();
    +        localeFix.tearDown();
    --- End diff --
    
    This is changing super.setUp to be `@BeforeClass` rather than `@BeforeMethod` (and same for `super.tearDown`). Is that really what is wanted? We might get away with it in this test class, but would feel better to declare two new methods like `@BeforeClass public void setUpClass() ...`, which just did the localeFix.setUp()`. Thoughts?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---