brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <>
Subject [GitHub] incubator-brooklyn pull request: Tasks stop on unmanaged
Date Thu, 16 Oct 2014 23:19:11 GMT
Github user aledsage commented on a diff in the pull request:
    --- Diff: software/webapp/src/test/java/brooklyn/entity/proxy/nginx/
    @@ -0,0 +1,174 @@
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package brooklyn.entity.proxy.nginx;
    +import java.util.Collection;
    +import java.util.List;
    +import java.util.concurrent.Callable;
    +import java.util.concurrent.CopyOnWriteArrayList;
    +import java.util.concurrent.ExecutorService;
    +import java.util.concurrent.Executors;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +import org.testng.Assert;
    +import org.testng.annotations.AfterMethod;
    +import org.testng.annotations.BeforeMethod;
    +import org.testng.annotations.Test;
    +import brooklyn.entity.Feed;
    +import brooklyn.entity.basic.Attributes;
    +import brooklyn.entity.basic.Entities;
    +import brooklyn.entity.basic.EntityInternal;
    +import brooklyn.entity.basic.Lifecycle;
    +import brooklyn.entity.proxying.EntitySpec;
    +import brooklyn.entity.rebind.RebindTestFixtureWithApp;
    +import brooklyn.entity.rebind.RebindTestUtils;
    +import brooklyn.entity.webapp.tomcat.TomcatServer;
    +import brooklyn.internal.BrooklynFeatureEnablement;
    +import brooklyn.location.LocationSpec;
    +import brooklyn.location.basic.LocalhostMachineProvisioningLocation;
    +import brooklyn.location.basic.SshMachineLocationReuseIntegrationTest.RecordingSshjTool;
    +import brooklyn.test.EntityTestUtils;
    +import brooklyn.test.WebAppMonitor;
    +import brooklyn.test.entity.TestApplication;
    +import brooklyn.util.internal.ssh.SshTool;
    +import brooklyn.util.repeat.Repeater;
    +import brooklyn.util.task.BasicExecutionManager;
    +import brooklyn.util.time.Duration;
    + * Test the operation of the {@link NginxController} class.
    + */
    +public class NginxRebindWithHaIntegrationTest extends RebindTestFixtureWithApp {
    +    private static final Logger LOG = LoggerFactory.getLogger(NginxRebindWithHaIntegrationTest.class);
    +    private URL warUrl;
    +    private List<WebAppMonitor> webAppMonitors = new CopyOnWriteArrayList<WebAppMonitor>();
    +    private ExecutorService executor;
    +    private LocalhostMachineProvisioningLocation loc;
    +    private Boolean feedRegistration;
    +    @Override
    +    protected boolean useLiveManagementContext() {
    +        // For Aled, the test failed without own ~/.brooklyn/
    +        // Suspect that was caused by local environment, with custom brooklyn.ssh.config.scriptHeader
    +        // to set things like correct Java on path.
    +        return true;
    +    }
    +    @BeforeMethod(groups = "Integration")
    --- End diff --
    Always use `@BeforeMethod(alwaysRun=true)`. Otherwise, if someone adds another test into
this class that is not integration group, it will pass in IDE and fail at command line because
the setUp won't be run.
    Same for `@AfterMethod`: don't include `groups="Integration"`

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

View raw message