You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by neykov <gi...@git.apache.org> on 2017/03/24 10:51:27 UTC

[GitHub] brooklyn-server pull request #610: Various integration test fixes

GitHub user neykov opened a pull request:

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

    Various integration test fixes

    See commits for details

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

    $ git pull https://github.com/neykov/brooklyn-server fix/integration-tests-2

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

    https://github.com/apache/brooklyn-server/pull/610.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 #610
    
----
commit c72ae67834c3d628c475e194ac9cb49208eb7fd7
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Date:   2017-03-24T10:15:47Z

    Replace http(s)://httpbin.org with a local server

commit 2594b969974d906f1cc7e2348c6bb6f26156bab8
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Date:   2017-03-24T10:17:04Z

    WinRmFeedIntegrationTest relies on an external resource, mark as Live
    
    Requires that the user spins up a windows machine and configures its location in his local brooklyn.properties.

commit 5b1905099f9b2fd710ef7860e6e3cb65ff348996
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Date:   2017-03-24T10:49:25Z

    Mark failing integration tests as Broken

commit 79efd1fbe94c5f130ab1886f462b871b087b1c07
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Date:   2017-03-24T10:50:35Z

    Fixes integration tests
    
    * One is a real problem - http://jsonip.com redirects to https://jsonip.com, which is signed by a certificate issued by "Let's Encrypt", not supported by java
    * The other changes the incorrect expectation in the test

----


---
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 #610: Various integration test fixes

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

    https://github.com/apache/brooklyn-server/pull/610
  
    Looks good.


---
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 #610: Various integration test fixes

Posted by duncangrant <gi...@git.apache.org>.
Github user duncangrant commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/610#discussion_r107880463
  
    --- Diff: core/src/test/java/org/apache/brooklyn/core/effector/http/HttpCommandEffectorHttpBinTest.java ---
    @@ -38,42 +54,93 @@
     import com.google.common.collect.ImmutableMap;
     import com.jayway.jsonpath.JsonPath;
     
    -public class HttpCommandEffectorIntegrationTest {
    +public class HttpCommandEffectorHttpBinTest {
     
         final static Effector<String> EFFECTOR_HTTPBIN = Effectors.effector(String.class, "Httpbin").buildAbstract();
     
    +    private TestHttpServer server;
    +    private String serverUrl;
         private TestApplication app;
         private EntityLocal entity;
         
    +    public static final class HttpBinRequestHandler implements HttpRequestHandler {
    --- End diff --
    
    Would it be simpler to use BetterMockWebServer here as in https://github.com/duncangrant/brooklyn-server/blob/1c064b284757ed0c794cbf8f3a6d65e34564af3a/core/src/test/java/org/apache/brooklyn/core/effector/http/HttpCommandEffectorTest.java#L68-L70



---
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 #610: Various integration test fixes

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

    https://github.com/apache/brooklyn-server/pull/610
  
    I considered that but decided against it for two reasons:
      * would be simpler to implement the behaviour once, rather then to setup the mock over and over in each test
      * some of the tests rely on the server returning different content, based on the url (say to check if an override url/parameter is applied). This would be harder to express with a fixed mock.


---
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 #610: Various integration test fixes

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

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


---
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 #610: Various integration test fixes

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/610#discussion_r107883050
  
    --- Diff: software/base/src/test/java/org/apache/brooklyn/entity/software/base/lifecycle/ScriptHelperIntegrationTest.java ---
    @@ -54,14 +56,25 @@
         private Location loc;
     
         @BeforeMethod(alwaysRun=true)
    -    @SuppressWarnings("unchecked")
         @Override
         public void setUp() throws Exception {
             super.setUp();
             loc = app.getManagementContext().getLocationRegistry().getLocationManaged("localhost");
         }
     
    -    @Test(groups = "Integration")
    +//    Fails with:
    +//    Message: SIGTERM should be tried one time expected [1] but found [16]
    +//
    +//        Stacktrace:
    +//
    +//        at org.testng.Assert.fail(Assert.java:94)
    +//        at org.testng.Assert.failNotEquals(Assert.java:513)
    +//        at org.testng.Assert.assertEqualsImpl(Assert.java:135)
    +//        at org.testng.Assert.assertEquals(Assert.java:116)
    +//        at org.testng.Assert.assertEquals(Assert.java:389)
    +//        at org.apache.brooklyn.entity.software.base.lifecycle.ScriptHelperIntegrationTest.testStopCommandWaitsToStopWithSigTerm(ScriptHelperIntegrationTest.java:83)
    +//        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    +    @Test(groups={"Integration","Broken"})
    --- End diff --
    
    cc @bostko - tried to figure out why kill doesn't work but didn't find an obvious reason


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