Github user neykov commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/614#discussion_r29433659
  
    --- Diff: usage/rest-server/src/test/java/brooklyn/rest/HaHotCheckTest.java 
---
    @@ -43,75 +43,61 @@
     
     public class HaHotCheckTest extends BrooklynRestResourceTest {
     
    -    private ManagementContextMock mgmtMock;
    -
    -    @Override
    -    @BeforeClass(alwaysRun = true)
    -    public void setUp() throws Exception {
    -        mgmtMock = new ManagementContextMock();
    -        super.setUp();
    -    }
    -
    -    @Override
    -    @AfterClass(alwaysRun = true)
    -    public void tearDown() throws Exception {
    -        super.tearDown();
    -    }
    -
         @BeforeMethod(alwaysRun = true)
    -    public void setUpMethod() {
    -        mgmtMock.setState(ManagementNodeState.MASTER);
    -    }
    +    public void setUp() throws Exception { super.setUp(); }
     
    +    @AfterMethod(alwaysRun = false)
    +    public void tearDown() throws Exception { super.tearDown(); }
    +    
         @Override
         protected void addBrooklynResources() {
    -        config.getSingletons().add(new 
ManagementContextProvider(mgmtMock));
    --- End diff --
    
    Probably can do the same for the other usages of 
`ManagementContextProvider`  and get rid of it altogether (not really 
important).


---
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.
---

Reply via email to