Return-Path: X-Original-To: apmail-brooklyn-dev-archive@minotaur.apache.org Delivered-To: apmail-brooklyn-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 951D217442 for ; Mon, 27 Oct 2014 21:21:24 +0000 (UTC) Received: (qmail 53451 invoked by uid 500); 27 Oct 2014 21:21:24 -0000 Delivered-To: apmail-brooklyn-dev-archive@brooklyn.apache.org Received: (qmail 53413 invoked by uid 500); 27 Oct 2014 21:21:24 -0000 Mailing-List: contact dev-help@brooklyn.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.incubator.apache.org Delivered-To: mailing list dev@brooklyn.incubator.apache.org Received: (qmail 53392 invoked by uid 99); 27 Oct 2014 21:21:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Oct 2014 21:21:24 +0000 X-ASF-Spam-Status: No, hits=-2000.6 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 27 Oct 2014 21:21:22 +0000 Received: (qmail 52914 invoked by uid 99); 27 Oct 2014 21:21:02 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Oct 2014 21:21:02 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 33700984711; Mon, 27 Oct 2014 21:21:02 +0000 (UTC) From: aledsage To: dev@brooklyn.incubator.apache.org Reply-To: dev@brooklyn.incubator.apache.org References: In-Reply-To: Subject: [GitHub] incubator-brooklyn pull request: Brooklyn node and cluster upgrade Content-Type: text/plain Message-Id: <20141027212102.33700984711@tyr.zones.apache.org> Date: Mon, 27 Oct 2014 21:21:02 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Github user aledsage commented on a diff in the pull request: https://github.com/apache/incubator-brooklyn/pull/272#discussion_r19438116 --- Diff: software/base/src/test/java/brooklyn/entity/brooklynnode/effector/SelectMasterEffectorTest.java --- @@ -0,0 +1,267 @@ +/* + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package brooklyn.entity.brooklynnode.effector; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; +import static org.testng.Assert.fail; + +import java.util.Collection; +import java.util.Collections; +import java.util.concurrent.Callable; + +import org.apache.http.client.methods.HttpPost; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +import brooklyn.entity.Entity; +import brooklyn.entity.Group; +import brooklyn.entity.basic.ApplicationBuilder; +import brooklyn.entity.basic.BasicApplication; +import brooklyn.entity.basic.EntityLocal; +import brooklyn.entity.brooklynnode.BrooklynCluster; +import brooklyn.entity.brooklynnode.BrooklynCluster.SelectMasterEffector; +import brooklyn.entity.brooklynnode.BrooklynClusterImpl; +import brooklyn.entity.brooklynnode.BrooklynNode; +import brooklyn.entity.brooklynnode.effector.CallbackEntityHttpClient.Request; +import brooklyn.entity.effector.Effectors; +import brooklyn.entity.group.DynamicCluster; +import brooklyn.entity.proxying.EntitySpec; +import brooklyn.event.feed.AttributePollHandler; +import brooklyn.event.feed.DelegatingPollHandler; +import brooklyn.event.feed.Poller; +import brooklyn.event.feed.function.FunctionFeed; +import brooklyn.management.ManagementContext; +import brooklyn.management.ha.ManagementNodeState; +import brooklyn.test.EntityTestUtils; +import brooklyn.test.entity.LocalManagementContextForTests; +import brooklyn.util.task.BasicExecutionContext; +import brooklyn.util.task.BasicExecutionManager; +import brooklyn.util.time.Duration; + +import com.google.common.base.Function; +import com.google.common.base.Objects; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Iterables; + +public class SelectMasterEffectorTest { + private static final Logger LOG = LoggerFactory.getLogger(BrooklynClusterImpl.class); + + protected ManagementContext mgmt; + protected BasicApplication app; + protected BasicExecutionContext ec; + protected BrooklynCluster cluster; + protected FunctionFeed scanMaster; + protected Poller poller; + + @BeforeMethod --- End diff -- Add `(alwaysRun=true)`; and same for `@AfterMethod. Otherwise if someone marks a test as `@Integration` it will fail at command line but pass in Eclipse. --- 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. ---