You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by aledsage <gi...@git.apache.org> on 2017/06/10 17:49:57 UTC

[GitHub] brooklyn-server pull request #727: Fix SoftwareProcessEntityFeedRebindTest

GitHub user aledsage opened a pull request:

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

    Fix SoftwareProcessEntityFeedRebindTest

    The test `testFeedsDoNotPollUntilManaged` failed in jenkins (see https://github.com/apache/brooklyn-server/pull/726#issuecomment-307579748) with the failure:
    ```
    java.lang.AssertionError: entity=MyServiceWithFeedsImpl{id=ghzmpwboh4}; attribute=Sensor: service.process.isRunning (java.lang.Boolean) expected [true] but found [null]
    	at org.apache.brooklyn.entity.software.base.SoftwareProcessEntityFeedRebindTest.runFeedsDoNotPollUntilManaged(SoftwareProcessEntityFeedRebindTest.java:110)
    	at org.apache.brooklyn.entity.software.base.SoftwareProcessEntityFeedRebindTest.testFeedsDoNotPollUntilManaged(SoftwareProcessEntityFeedRebindTest.java:68)
    ```
    
    The problem is that the sensor `SERVICE_PROCESS_IS_RUNNING` is set asynchronously -
     in `MyServiceWithFeeds.connectSensors`, it calls `connectServiceUpIsRunning`, which sets up a feed to poll the driver's `isRunning`. We therefore need to to use `assertAttributeEqualsEventually`, rather than `assertAttributeEquals`.
    
    This isn't a problem in normal production usage because the default behaviour of `SoftwareProcess` is to block until `driver.isRunning()` returns true. The fact the sensor isn't populated with true until a fraction of a second later isn't an issue.

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

    $ git pull https://github.com/aledsage/brooklyn-server fix-SoftwareProcessEntityFeedRebindTest

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

    https://github.com/apache/brooklyn-server/pull/727.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 #727
    
----
commit b5b7012d4c9a0be858dfa5f39f036d65d30f2f1e
Author: Aled Sage <al...@gmail.com>
Date:   2017-06-10T17:45:26Z

    Fix SoftwareProcessEntityFeedRebindTest

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server pull request #727: Fix SoftwareProcessEntityFeedRebindTest

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage closed the pull request at:

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


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server issue #727: Fix SoftwareProcessEntityFeedRebindTest

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the issue:

    https://github.com/apache/brooklyn-server/pull/727
  
    LGTM, same fix in https://github.com/apache/brooklyn-server/pull/717.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server issue #727: Fix SoftwareProcessEntityFeedRebindTest

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the issue:

    https://github.com/apache/brooklyn-server/pull/727
  
    Closing; instead merged https://github.com/apache/brooklyn-server/pull/717 which has the same fix.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---