GitHub user aledsage opened a pull request:

    https://github.com/apache/brooklyn-server/pull/406

    Fix app.stop so doesn’t go on-fire briefly

    Previously in app.stop, we set the serviceUp=false before setting
    expectedState=stopping. This meant there was a race where we could
    briefly infer the actual state as on_fire.
    
    This caused failure of `SoftwareProcessEntityLatchTest.testStopLatchBlocks`:
    the attributeWhenReady latch would abort because it received an
    event saying that the app was on_fire, so the stop_latch completely
    immediately.
    
    The fix is simple: in app.stop, set the expectedSate=stopping before
    setting serviceUp=false.
    
    @neykov @geomacy you'll both be interested in this.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/aledsage/brooklyn-server 
fix-app-onFire-briefly-on-stop

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/brooklyn-server/pull/406.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 #406
    
----
commit 0070c6b417963018bbb1e4a86d1cedd1f249fc22
Author: Aled Sage <[email protected]>
Date:   2016-11-04T17:34:55Z

    Fix app.stop so doesn’t go on-fire briefly
    
    Previously in app.stop, we set the serviceUp=false before setting
    expectedState=stopping. This meant there was a race where we could
    briefly infer the actual state as on_fire.
    
    This caused failure of SoftwareProcessEntityLatchTest.testStopLatchBlocks:
    the attributeWhenReady latch would abort because it received an
    event saying that the app was on_fire, so the stop_latch completely
    immediately.
    
    The fix is simple: in app.stop, set the expectedSate=stopping before
    setting serviceUp=false.

----


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