You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2017/03/17 10:48:52 UTC
[1/3] brooklyn-server git commit: Revert "add original failing test
from @sjcorbett"
Repository: brooklyn-server
Updated Branches:
refs/heads/master 9eaa969d9 -> a0f884059
Revert "add original failing test from @sjcorbett"
This reverts commit d7cbaeed46d7fedf8e49df015baa812352060f45.
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/ba2cf5d0
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/ba2cf5d0
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/ba2cf5d0
Branch: refs/heads/master
Commit: ba2cf5d0af6a755769a0e1022ac077e81743c591
Parents: e317fc5
Author: graeme.miller <gr...@cloudsoftcorp.com>
Authored: Tue Mar 14 15:35:38 2017 +0000
Committer: graeme.miller <gr...@cloudsoftcorp.com>
Committed: Wed Mar 15 11:34:55 2017 +0000
----------------------------------------------------------------------
rest/rest-server/pom.xml | 6 -
.../BrooklynRestApiLauncherTestFixture.java | 2 +-
.../entity/RedisClusterIntegrationTest.java | 109 -------------------
3 files changed, 1 insertion(+), 116 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/ba2cf5d0/rest/rest-server/pom.xml
----------------------------------------------------------------------
diff --git a/rest/rest-server/pom.xml b/rest/rest-server/pom.xml
index bcd271b..a269b72 100644
--- a/rest/rest-server/pom.xml
+++ b/rest/rest-server/pom.xml
@@ -153,12 +153,6 @@
</dependency>
<dependency>
<groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-software-nosql</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
<artifactId>brooklyn-locations-jclouds</artifactId>
<version>${project.version}</version>
<scope>test</scope>
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/ba2cf5d0/rest/rest-server/src/test/java/org/apache/brooklyn/rest/BrooklynRestApiLauncherTestFixture.java
----------------------------------------------------------------------
diff --git a/rest/rest-server/src/test/java/org/apache/brooklyn/rest/BrooklynRestApiLauncherTestFixture.java b/rest/rest-server/src/test/java/org/apache/brooklyn/rest/BrooklynRestApiLauncherTestFixture.java
index 642ef87..b84dbcf 100644
--- a/rest/rest-server/src/test/java/org/apache/brooklyn/rest/BrooklynRestApiLauncherTestFixture.java
+++ b/rest/rest-server/src/test/java/org/apache/brooklyn/rest/BrooklynRestApiLauncherTestFixture.java
@@ -47,7 +47,7 @@ import static org.testng.Assert.assertTrue;
public abstract class BrooklynRestApiLauncherTestFixture {
- protected Server server = null;
+ Server server = null;
@AfterMethod(alwaysRun=true)
public void stopServer() throws Exception {
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/ba2cf5d0/rest/rest-server/src/test/java/org/apache/brooklyn/rest/test/entity/RedisClusterIntegrationTest.java
----------------------------------------------------------------------
diff --git a/rest/rest-server/src/test/java/org/apache/brooklyn/rest/test/entity/RedisClusterIntegrationTest.java b/rest/rest-server/src/test/java/org/apache/brooklyn/rest/test/entity/RedisClusterIntegrationTest.java
deleted file mode 100644
index 79b162b..0000000
--- a/rest/rest-server/src/test/java/org/apache/brooklyn/rest/test/entity/RedisClusterIntegrationTest.java
+++ /dev/null
@@ -1,109 +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.rest.test.entity;
-
-import static org.apache.brooklyn.test.Asserts.assertTrue;
-import static org.testng.Assert.assertNotNull;
-
-import java.net.URI;
-import java.util.Map;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeoutException;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.mgmt.ManagementContext;
-import org.apache.brooklyn.api.mgmt.Task;
-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.entity.brooklynnode.BrooklynNode;
-import org.apache.brooklyn.entity.nosql.redis.RedisCluster;
-import org.apache.brooklyn.entity.nosql.redis.RedisStore;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.rest.BrooklynRestApiLauncherTestFixture;
-import org.apache.brooklyn.util.http.HttpAsserts;
-import org.apache.brooklyn.util.http.HttpToolResponse;
-import org.apache.brooklyn.util.text.Strings;
-import org.apache.brooklyn.util.time.Duration;
-import org.apache.brooklyn.util.yaml.Yamls;
-import org.testng.Assert;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableMap;
-
-public class RedisClusterIntegrationTest extends BrooklynRestApiLauncherTestFixture {
-
- @BeforeMethod(alwaysRun=true)
- public void setUp() throws Exception {
- useServerForTest(newServer());
- }
-
- @Test(groups = "Integration")
- public void testDeployRedisCluster() throws InterruptedException, ExecutionException, TimeoutException {
- final URI webConsoleUri = URI.create(getBaseUriRest());
-
- // Test setup
- final EntitySpec<BrooklynNode> spec = EntitySpec.create(BrooklynNode.class);
- final ManagementContext mgmt = getManagementContextFromJettyServerAttributes(server);
- final BrooklynNode node = mgmt.getEntityManager().createEntity(spec);
- node.sensors().set(BrooklynNode.WEB_CONSOLE_URI, webConsoleUri);
-
- // Deploy it.
- final String blueprint = "location: localhost\n" +
- "services:\n" +
- "- type: org.apache.brooklyn.entity.nosql.redis.RedisCluster";
- HttpToolResponse response = node.http().post(
- "/applications",
- ImmutableMap.of("Content-Type", "text/yaml"),
- blueprint.getBytes());
- HttpAsserts.assertHealthyStatusCode(response.getResponseCode());
-
- // Assert application is eventually running and not on fire.
- final Entity entity = mgmt.getApplications().iterator().next().getChildren().iterator().next();
- assertTrue(entity instanceof RedisCluster,
- "expected " + RedisCluster.class.getName() + ", found: " + entity);
- RedisCluster cluster = RedisCluster.class.cast(entity);
- Entities.dumpInfo(cluster);
- assertDownloadUrl(cluster.getMaster());
- for (Entity slave : cluster.getSlaves().getMembers()) {
- assertDownloadUrl(slave);
- }
-
- @SuppressWarnings("unchecked")
- String taskId = Strings.toString( ((Map<String,Object>) Yamls.parseAll(response.getContentAsString()).iterator().next()).get("id") );
- Task<?> task = mgmt.getExecutionManager().getTask(taskId);
- Assert.assertNotNull(task);
-
- task.get(Duration.minutes(20));
-
- Entities.dumpInfo(cluster);
-
- EntityAsserts.assertAttributeEquals(entity, SoftwareProcess.SERVICE_UP, true);
- }
-
- private void assertDownloadUrl(Entity entity) {
- assertNotNull(entity.config().get(RedisStore.DOWNLOAD_URL), "RedisStore.DOWNLOAD_URL");
- assertNotNull(entity.config().get(SoftwareProcess.DOWNLOAD_URL), "SoftwareProcess.DOWNLOAD_URL");
- assertNotNull(entity.config().get(Attributes.DOWNLOAD_URL), "Attributes.DOWNLOAD_URL");
- }
-
-}
\ No newline at end of file
[3/3] brooklyn-server git commit: restore the `server` field reverted
in #594 as it is still needed by that test case,
just that test case is being moved to the QA project in library
Posted by he...@apache.org.
restore the `server` field reverted in #594 as it is still needed by that test case,
just that test case is being moved to the QA project in library
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/a0f88405
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/a0f88405
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/a0f88405
Branch: refs/heads/master
Commit: a0f884059af1623ab0aa5ef11961b5f2839e9397
Parents: 4be53d3
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Fri Mar 17 10:47:38 2017 +0000
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Fri Mar 17 10:47:38 2017 +0000
----------------------------------------------------------------------
.../apache/brooklyn/rest/BrooklynRestApiLauncherTestFixture.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/a0f88405/rest/rest-server/src/test/java/org/apache/brooklyn/rest/BrooklynRestApiLauncherTestFixture.java
----------------------------------------------------------------------
diff --git a/rest/rest-server/src/test/java/org/apache/brooklyn/rest/BrooklynRestApiLauncherTestFixture.java b/rest/rest-server/src/test/java/org/apache/brooklyn/rest/BrooklynRestApiLauncherTestFixture.java
index b84dbcf..642ef87 100644
--- a/rest/rest-server/src/test/java/org/apache/brooklyn/rest/BrooklynRestApiLauncherTestFixture.java
+++ b/rest/rest-server/src/test/java/org/apache/brooklyn/rest/BrooklynRestApiLauncherTestFixture.java
@@ -47,7 +47,7 @@ import static org.testng.Assert.assertTrue;
public abstract class BrooklynRestApiLauncherTestFixture {
- Server server = null;
+ protected Server server = null;
@AfterMethod(alwaysRun=true)
public void stopServer() throws Exception {
[2/3] brooklyn-server git commit: This closes #594
Posted by he...@apache.org.
This closes #594
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/4be53d33
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/4be53d33
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/4be53d33
Branch: refs/heads/master
Commit: 4be53d338d298c27aa90927034c01c51d797866d
Parents: 9eaa969 ba2cf5d
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Fri Mar 17 10:46:45 2017 +0000
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Fri Mar 17 10:46:45 2017 +0000
----------------------------------------------------------------------
rest/rest-server/pom.xml | 6 -
.../BrooklynRestApiLauncherTestFixture.java | 2 +-
.../entity/RedisClusterIntegrationTest.java | 109 -------------------
3 files changed, 1 insertion(+), 116 deletions(-)
----------------------------------------------------------------------