You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2021/08/14 01:54:53 UTC

[brooklyn-server] 01/06: minor tidies to launcher/viewer and cleanup, for tests

This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git

commit a15921188eeb08845b9ede54fbc4f94eac4372b8
Author: Alex Heneveld <al...@cloudsoftcorp.com>
AuthorDate: Sat Aug 14 01:49:31 2021 +0100

    minor tidies to launcher/viewer and cleanup, for tests
---
 .../main/java/org/apache/brooklyn/launcher/BrooklynLauncher.java   | 1 +
 .../apache/brooklyn/launcher/blueprints/AbstractBlueprintTest.java | 7 +------
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynLauncher.java b/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynLauncher.java
index 46cee52..8c1bf5b 100644
--- a/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynLauncher.java
+++ b/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynLauncher.java
@@ -421,6 +421,7 @@ public class BrooklynLauncher extends BasicLauncher<BrooklynLauncher> {
         if (webServer != null) {
             try {
                 webServer.stop();
+                webServer = null;
             } catch (Exception e) {
                 LOG.warn("Error stopping web-server; continuing with termination", e);
             }
diff --git a/launcher/src/test/java/org/apache/brooklyn/launcher/blueprints/AbstractBlueprintTest.java b/launcher/src/test/java/org/apache/brooklyn/launcher/blueprints/AbstractBlueprintTest.java
index 7d6bcc4..0c57f2d 100644
--- a/launcher/src/test/java/org/apache/brooklyn/launcher/blueprints/AbstractBlueprintTest.java
+++ b/launcher/src/test/java/org/apache/brooklyn/launcher/blueprints/AbstractBlueprintTest.java
@@ -205,12 +205,7 @@ public abstract class AbstractBlueprintTest {
     }
     
     protected void runTest(Reader yaml) throws Exception {
-        final Application app = launcher.launchAppYaml(yaml);
-        
-        assertNoFires(app);
-        
-        Application newApp = rebind();
-        assertNoFires(newApp);
+        runTest(launcher.launchAppYaml(yaml), this::assertNoFires);
     }
     
     protected void assertNoFires(final Entity app) {