brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorb...@apache.org
Subject [1/2] brooklyn-server git commit: AbstractYamlTest: make setUpPlatform overridable
Date Tue, 10 Jan 2017 16:30:05 GMT
Repository: brooklyn-server
Updated Branches:
  refs/heads/master 1d2d53504 -> 07e5503d8


AbstractYamlTest: make setUpPlatform overridable

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/27595281
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/27595281
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/27595281

Branch: refs/heads/master
Commit: 27595281a34fa4f2c0eace5a80844b4aff908cdd
Parents: 84eba7e
Author: Aled Sage <aled.sage@gmail.com>
Authored: Fri Dec 16 14:11:03 2016 +0000
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Fri Jan 6 10:22:11 2017 +0000

----------------------------------------------------------------------
 .../brooklyn/camp/brooklyn/AbstractYamlTest.java      | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/27595281/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/AbstractYamlTest.java
----------------------------------------------------------------------
diff --git a/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/AbstractYamlTest.java
b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/AbstractYamlTest.java
index e0eef7d..f30ae95 100644
--- a/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/AbstractYamlTest.java
+++ b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/AbstractYamlTest.java
@@ -69,6 +69,11 @@ public abstract class AbstractYamlTest {
     @BeforeMethod(alwaysRun = true)
     public void setUp() throws Exception {
         forceUpdate = false;
+        brooklynMgmt = setUpPlatform();
+        catalog = brooklynMgmt.getCatalog();
+    }
+
+    protected ManagementContext setUpPlatform() {
         launcher = new BrooklynCampPlatformLauncherNoServer() {
             @Override
             protected LocalManagementContext newMgmtContext() {
@@ -76,11 +81,10 @@ public abstract class AbstractYamlTest {
             }
         };
         launcher.launch();
-        brooklynMgmt = launcher.getBrooklynMgmt();
-        catalog = brooklynMgmt.getCatalog();
         platform = launcher.getCampPlatform();
+        return launcher.getBrooklynMgmt();
     }
-
+    
     protected LocalManagementContext newTestManagementContext() {
         Builder builder = LocalManagementContextForTests.builder(true).disableOsgi(disableOsgi());
         if (useDefaultProperties()) {
@@ -101,6 +105,10 @@ public abstract class AbstractYamlTest {
     @AfterMethod(alwaysRun = true)
     public void tearDown() throws Exception {
         if (brooklynMgmt != null) Entities.destroyAll(brooklynMgmt);
+        tearDownPlatform();
+    }
+
+    protected void tearDownPlatform() throws Exception {
         if (launcher != null) launcher.stopServers();
     }
 


Mime
View raw message