brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <>
Subject [GitHub] incubator-brooklyn pull request: Fix the locale so tests are deter...
Date Sat, 11 Oct 2014 13:08:37 GMT
Github user aledsage commented on a diff in the pull request:
    --- Diff: core/src/test/java/brooklyn/util/text/ ---
    @@ -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;
     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 or file a JIRA ticket
with INFRA.

View raw message