Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id F1B66200B43 for ; Tue, 19 Jul 2016 12:35:56 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id F055C160A89; Tue, 19 Jul 2016 10:35:56 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 45B27160A76 for ; Tue, 19 Jul 2016 12:35:56 +0200 (CEST) Received: (qmail 75713 invoked by uid 500); 19 Jul 2016 10:35:55 -0000 Mailing-List: contact dev-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list dev@brooklyn.apache.org Received: (qmail 75697 invoked by uid 99); 19 Jul 2016 10:35:55 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jul 2016 10:35:55 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D4E24E03A6; Tue, 19 Jul 2016 10:35:54 +0000 (UTC) From: aledsage To: dev@brooklyn.apache.org Reply-To: dev@brooklyn.apache.org References: In-Reply-To: Subject: [GitHub] brooklyn-server pull request #266: BROOKLYN-264: refactor wait-for-provision Content-Type: text/plain Message-Id: <20160719103554.D4E24E03A6@git1-us-west.apache.org> Date: Tue, 19 Jul 2016 10:35:54 +0000 (UTC) archived-at: Tue, 19 Jul 2016 10:35:57 -0000 Github user aledsage commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/266#discussion_r71313969 --- Diff: software/base/src/test/java/org/apache/brooklyn/entity/ExpungingJcloudsLocationLiveTest.java --- @@ -1,186 +0,0 @@ -/* - * 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 org.apache.brooklyn.entity; - -import com.google.common.base.Predicate; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.Iterables; -import org.apache.brooklyn.api.entity.EntitySpec; -import org.apache.brooklyn.core.entity.Attributes; -import org.apache.brooklyn.core.entity.Entities; -import org.apache.brooklyn.core.entity.EntityAsserts; -import org.apache.brooklyn.core.entity.lifecycle.Lifecycle; -import org.apache.brooklyn.core.internal.BrooklynProperties; -import org.apache.brooklyn.core.location.LocationConfigKeys; -import org.apache.brooklyn.core.location.cloud.CloudLocationConfig; -import org.apache.brooklyn.core.mgmt.EntityManagementUtils; -import org.apache.brooklyn.core.test.BrooklynAppLiveTestSupport; -import org.apache.brooklyn.core.test.entity.LocalManagementContextForTests; -import org.apache.brooklyn.core.test.entity.TestApplication; -import org.apache.brooklyn.entity.software.base.EmptySoftwareProcess; -import org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess; -import org.apache.brooklyn.location.jclouds.JcloudsLocation; -import org.apache.brooklyn.util.collections.MutableMap; -import org.jclouds.aws.ec2.compute.AWSEC2ComputeService; -import org.jclouds.compute.domain.ComputeMetadata; -import org.jclouds.compute.domain.NodeMetadata; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -import javax.annotation.Nullable; -import java.util.Map; -import java.util.concurrent.Callable; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; -import java.util.regex.Pattern; - -import static org.apache.brooklyn.test.Asserts.*; - -public class ExpungingJcloudsLocationLiveTest extends BrooklynAppLiveTestSupport { - private static final Logger LOG = LoggerFactory.getLogger(ExpungingJcloudsLocationLiveTest.class); - - protected BrooklynProperties brooklynProperties; - - @BeforeMethod(alwaysRun=true) - @Override - public void setUp() throws Exception { - // Don't let any defaults from brooklyn.properties (except credentials) interfere with test - brooklynProperties = BrooklynProperties.Factory.newDefault(); - - // Also removes scriptHeader (e.g. if doing `. ~/.bashrc` and `. ~/.profile`, then that can cause "stdin: is not a tty") - brooklynProperties.remove("brooklyn.ssh.config.scriptHeader"); - - mgmt = new LocalManagementContextForTests(brooklynProperties); - super.setUp(); - } - - @Test - public void verifyExpungingMockedEntityIsQuick() throws Exception { - final EmptySoftwareProcess emptySoftwareProcess = app.createAndManageChild(EntitySpec.create(EmptySoftwareProcess.class)); --- End diff -- Good point - my SoftwareProcessStopsDuringStartTest.testSequentialStartThenStop doesn't time how long the call took. --- 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. ---