You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by al...@apache.org on 2017/12/20 16:13:34 UTC
[2/5] brooklyn-server git commit: test fixes
test fixes
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/3555b482
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/3555b482
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/3555b482
Branch: refs/heads/master
Commit: 3555b4828babb2d9f4a74ef38883cb8fb634906d
Parents: 972ae5c
Author: graeme.miller <gr...@cloudsoftcorp.com>
Authored: Wed Dec 6 14:23:39 2017 +0000
Committer: graeme.miller <gr...@cloudsoftcorp.com>
Committed: Wed Dec 6 14:23:39 2017 +0000
----------------------------------------------------------------------
.../enricher/stock/aggregator/AggregationJobTest.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3555b482/core/src/test/java/org/apache/brooklyn/enricher/stock/aggregator/AggregationJobTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/enricher/stock/aggregator/AggregationJobTest.java b/core/src/test/java/org/apache/brooklyn/enricher/stock/aggregator/AggregationJobTest.java
index 1513984..a286143 100644
--- a/core/src/test/java/org/apache/brooklyn/enricher/stock/aggregator/AggregationJobTest.java
+++ b/core/src/test/java/org/apache/brooklyn/enricher/stock/aggregator/AggregationJobTest.java
@@ -30,6 +30,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -48,10 +49,11 @@ public class AggregationJobTest {
AggregationJob aggregationJob;
- LocalManagementContext localManagementContext = LocalManagementContextForTests.newInstance();
+ LocalManagementContext localManagementContext;
@BeforeMethod
public void testSetup() {
+ localManagementContext = LocalManagementContextForTests.newInstance();
testApplication = TestApplication.Factory.newManagedInstanceForTests(localManagementContext);
parentEntity = testApplication.createAndManageChild(EntitySpec.create(TestEntity.class));
@@ -61,6 +63,11 @@ public class AggregationJobTest {
aggregationJob = new AggregationJob(parentEntity);
}
+ @AfterMethod
+ public void testTeardown(){
+ localManagementContext.terminate();
+ }
+
@Test
public void policyHighlightTest() {
//Setup