GitHub user aledsage opened a pull request:
https://github.com/apache/brooklyn-server/pull/767
Adds BrooklynViewerLauncher (for tests)
As per the javadoc:
```
/**
* A convenience for started the Brooklyn REST api and web-app in a test,
so that one can visually
* inspect the app that the test creates. This is intended as a read-only
view (but it has the real
* management context so one can perform actions through this UI).
*
* It expects to be configured with an existing {@link
org.apache.brooklyn.api.mgmt.ManagementContext}.
*
* Various other configuration options (e.g. {@link #application(String))
will be ignored.
*
* An example of where this is very useful is when testing a blueprint
where an effector hangs -
* one can visually inspect the app, drilling into the activities view to
see what it is doing
* and why it is blocked.
```
Note that `AbstractBlueprintTest` used to do this with `BrooklynLauncher`,
but that is broken - that launcher also tries to set the `managementPlaneId` on
the management context, but it's already set so it throws an exception.
My motivation for fixing + adding this is mostly for use in downstream
projects. I want to run unit/integration tests that deploy + test some
complicated blueprints. It's very useful to have this visualisation in such
tests (particularly if it fails, and one places a breakpoint to see what
activities have executed by that point).
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/aledsage/brooklyn-server
BrooklynViewerLauncher
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-server/pull/767.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #767
----
commit 352e9cf2d01cbe859938d1f79a91bee786ca323a
Author: Aled Sage <[email protected]>
Date: 2017-07-19T09:58:30Z
Adds BrooklynViewerLauncher (for tests)
----
---
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.
---