brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [16/20] incubator-brooklyn git commit: Updates for github comments.
Date Mon, 23 Nov 2015 18:29:45 GMT
Updates for github comments.

Remove unneeded logback file.
https://github.com/apache/incubator-brooklyn/pull/1030#discussion_r45317465

Remove spurious imports.
https://github.com/apache/incubator-brooklyn/pull/1030#discussion_r45317585
https://github.com/apache/incubator-brooklyn/pull/1030#discussion_r45317643

Include 'this' in log messages.
https://github.com/apache/incubator-brooklyn/pull/1030#discussion_r45317630


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/ad756062
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/ad756062
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/ad756062

Branch: refs/heads/master
Commit: ad756062604b39364b081f0aae7465edbbae23bc
Parents: b2713ca
Author: Geoff Macartney <geoff.macartney@cloudsoftcorp.com>
Authored: Thu Nov 19 10:05:17 2015 +0000
Committer: Geoff Macartney <geoff.macartney@cloudsoftcorp.com>
Committed: Thu Nov 19 10:15:25 2015 +0000

----------------------------------------------------------------------
 .../brooklyn/test/framework/TestCase.java       |  1 -
 .../test/framework/TestHttpCallImpl.java        | 14 ++++----
 .../brooklyn/test/framework/TestSensor.java     |  1 -
 .../brooklyn/logback-appender-stdout.xml        | 37 --------------------
 4 files changed, 7 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ad756062/usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestCase.java
----------------------------------------------------------------------
diff --git a/usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestCase.java
b/usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestCase.java
index d05889d..78fd8d6 100644
--- a/usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestCase.java
+++ b/usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestCase.java
@@ -19,7 +19,6 @@
 package org.apache.brooklyn.test.framework;
 
 import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.core.entity.trait.Startable;
 
 /**
  * Entity that logically groups other test entities

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ad756062/usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestHttpCallImpl.java
----------------------------------------------------------------------
diff --git a/usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestHttpCallImpl.java
b/usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestHttpCallImpl.java
index a1d84bf..5f64f3c 100644
--- a/usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestHttpCallImpl.java
+++ b/usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestHttpCallImpl.java
@@ -58,7 +58,7 @@ public class TestHttpCallImpl extends AbstractTest implements TestHttpCall
{
             sensors().set(SERVICE_UP, true);
             ServiceStateLogic.setExpectedState(this, Lifecycle.RUNNING);
         } catch (Throwable t) {
-            LOG.debug("Url [{}] test failed", url);
+            LOG.info("{} Url [{}] test failed", this, url);
             sensors().set(SERVICE_UP, false);
             ServiceStateLogic.setExpectedState(this, Lifecycle.ON_FIRE);
             throw Exceptions.propagate(t);
@@ -89,16 +89,16 @@ public class TestHttpCallImpl extends AbstractTest implements TestHttpCall
{
 
         for (final Map.Entry<?, ?> entry : assertions.entrySet()) {
             if (Objects.equal(entry.getKey(), "regex")) {
-                LOG.debug("Testing if url [{}] matches regex [{}]",
-                        new Object[]{url, entry.getValue()});
+                LOG.debug("{} Testing if url [{}] matches regex [{}]",
+                        new Object[]{this, url, entry.getValue()});
                 assertContentEventuallyMatches(flags, url, TypeCoercions.coerce(entry.getValue(),
String.class));
             } else if (Objects.equal(entry.getKey(), "bodyContains")) {
-                LOG.debug("Testing if url [{}] contains string [{}]",
-                        new Object[]{url, entry.getValue()});
+                LOG.debug("{} Testing if url [{}] contains string [{}]",
+                        new Object[]{this, url, entry.getValue()});
                 assertContentEventuallyContainsText(flags, url, TypeCoercions.coerce(entry.getValue(),
String.class));
             } else if (Objects.equal(entry.getKey(), "status")) {
-                LOG.debug("Testing if url [{}] returns status code [{}]",
-                        new Object[]{url, entry.getValue()});
+                LOG.debug("{} Testing if url [{}] returns status code [{}]",
+                        new Object[]{this, url, entry.getValue()});
                 assertHttpStatusCodeEventuallyEquals(flags, url, TypeCoercions.coerce(entry.getValue(),
Integer.class));
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ad756062/usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestSensor.java
----------------------------------------------------------------------
diff --git a/usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestSensor.java
b/usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestSensor.java
index 3655501..ec070d1 100644
--- a/usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestSensor.java
+++ b/usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestSensor.java
@@ -21,7 +21,6 @@ package org.apache.brooklyn.test.framework;
 import org.apache.brooklyn.api.entity.ImplementedBy;
 import org.apache.brooklyn.config.ConfigKey;
 import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.trait.Startable;
 import org.apache.brooklyn.util.core.flags.SetFromFlag;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ad756062/usage/test-framework/src/test/resources/brooklyn/logback-appender-stdout.xml
----------------------------------------------------------------------
diff --git a/usage/test-framework/src/test/resources/brooklyn/logback-appender-stdout.xml
b/usage/test-framework/src/test/resources/brooklyn/logback-appender-stdout.xml
deleted file mode 100644
index f2515ad..0000000
--- a/usage/test-framework/src/test/resources/brooklyn/logback-appender-stdout.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<included>
-
-    <!-- change settings in this file for (temporary!) debug purposes, e.g. change filter
level to DEBUG below -->
-
-    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
-        <encoder>
-            <pattern>%d %-5level %msg%n%xEx{0}</pattern>
-        </encoder>
-        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
-            <level>INFO</level>
-        </filter>
-    </appender>
-
-    <root>
-        <appender-ref ref="STDOUT" />
-    </root>
-
-</included>
\ No newline at end of file


Mime
View raw message