qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oru...@apache.org
Subject qpid-broker-j git commit: QPID-7468: [Java Broker] Make unit tests log into separate files
Date Thu, 27 Apr 2017 13:26:58 GMT
Repository: qpid-broker-j
Updated Branches:
  refs/heads/6.1.x 586863c9e -> eeb0e05bd


QPID-7468: [Java Broker] Make unit tests log into separate files

(cherry picked from commit cf903d9a120a7ae6bd524c4d8a57066d575cc6a5)


Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/eeb0e05b
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/eeb0e05b
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/eeb0e05b

Branch: refs/heads/6.1.x
Commit: eeb0e05bd752d5dbeb7251cebf11dd46c74052fe
Parents: 586863c
Author: Lorenz Quack <lquack@apache.org>
Authored: Thu Apr 13 13:32:12 2017 +0000
Committer: Alex Rudyy <orudyy@apache.org>
Committed: Thu Apr 27 14:18:17 2017 +0100

----------------------------------------------------------------------
 .../LogbackPropertyValueDiscriminator.java      | 63 ++++++++++++++++++++
 qpid-test-utils/src/main/resources/logback.xml  |  2 +-
 .../LogbackPropertyValueDiscriminator.java      | 63 --------------------
 3 files changed, 64 insertions(+), 64 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/eeb0e05b/qpid-test-utils/src/main/java/org/apache/qpid/test/utils/LogbackPropertyValueDiscriminator.java
----------------------------------------------------------------------
diff --git a/qpid-test-utils/src/main/java/org/apache/qpid/test/utils/LogbackPropertyValueDiscriminator.java
b/qpid-test-utils/src/main/java/org/apache/qpid/test/utils/LogbackPropertyValueDiscriminator.java
new file mode 100644
index 0000000..70fdae1
--- /dev/null
+++ b/qpid-test-utils/src/main/java/org/apache/qpid/test/utils/LogbackPropertyValueDiscriminator.java
@@ -0,0 +1,63 @@
+/*
+ *
+ * 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.qpid.test.utils;
+
+import ch.qos.logback.classic.spi.ILoggingEvent;
+import ch.qos.logback.classic.spi.LoggerContextVO;
+import ch.qos.logback.core.sift.AbstractDiscriminator;
+
+public class LogbackPropertyValueDiscriminator extends AbstractDiscriminator<ILoggingEvent>
+{
+    private String _key;
+    private String _defaultValue;
+
+    @Override
+    public String getDiscriminatingValue(final ILoggingEvent event)
+    {
+        final LoggerContextVO context = event.getLoggerContextVO();
+        if (context != null && context.getPropertyMap() != null && context.getPropertyMap().get(_key)
!= null)
+        {
+            return context.getPropertyMap().get(_key);
+        }
+        return _defaultValue;
+    }
+
+    @Override
+    public String getKey()
+    {
+        return _key;
+    }
+
+    public void setKey(String key)
+    {
+        _key = key;
+    }
+
+    public String getDefaultValue()
+    {
+        return _defaultValue;
+    }
+
+    public void setDefaultValue(String defaultValue)
+    {
+        _defaultValue = defaultValue;
+    }
+}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/eeb0e05b/qpid-test-utils/src/main/resources/logback.xml
----------------------------------------------------------------------
diff --git a/qpid-test-utils/src/main/resources/logback.xml b/qpid-test-utils/src/main/resources/logback.xml
index 430a752..fbd8d53 100644
--- a/qpid-test-utils/src/main/resources/logback.xml
+++ b/qpid-test-utils/src/main/resources/logback.xml
@@ -23,7 +23,7 @@
     <contextName>qpid-test-utils</contextName>
 
     <appender name="RootSiftAppender" class="ch.qos.logback.classic.sift.SiftingAppender">
-        <discriminator>
+        <discriminator class="org.apache.qpid.test.utils.LogbackPropertyValueDiscriminator">
             <Key>classQualifiedTestName</Key>
             <DefaultValue>testrun</DefaultValue>
         </discriminator>

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/eeb0e05b/systests/src/main/java/org/apache/qpid/test/utils/LogbackPropertyValueDiscriminator.java
----------------------------------------------------------------------
diff --git a/systests/src/main/java/org/apache/qpid/test/utils/LogbackPropertyValueDiscriminator.java
b/systests/src/main/java/org/apache/qpid/test/utils/LogbackPropertyValueDiscriminator.java
deleted file mode 100644
index 70fdae1..0000000
--- a/systests/src/main/java/org/apache/qpid/test/utils/LogbackPropertyValueDiscriminator.java
+++ /dev/null
@@ -1,63 +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.qpid.test.utils;
-
-import ch.qos.logback.classic.spi.ILoggingEvent;
-import ch.qos.logback.classic.spi.LoggerContextVO;
-import ch.qos.logback.core.sift.AbstractDiscriminator;
-
-public class LogbackPropertyValueDiscriminator extends AbstractDiscriminator<ILoggingEvent>
-{
-    private String _key;
-    private String _defaultValue;
-
-    @Override
-    public String getDiscriminatingValue(final ILoggingEvent event)
-    {
-        final LoggerContextVO context = event.getLoggerContextVO();
-        if (context != null && context.getPropertyMap() != null && context.getPropertyMap().get(_key)
!= null)
-        {
-            return context.getPropertyMap().get(_key);
-        }
-        return _defaultValue;
-    }
-
-    @Override
-    public String getKey()
-    {
-        return _key;
-    }
-
-    public void setKey(String key)
-    {
-        _key = key;
-    }
-
-    public String getDefaultValue()
-    {
-        return _defaultValue;
-    }
-
-    public void setDefaultValue(String defaultValue)
-    {
-        _defaultValue = defaultValue;
-    }
-}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message