Skip to content

Commit 75ebbbf

Browse files
committed
move disabled tests to logback-classic-blackbox
1 parent 20cfd43 commit 75ebbbf

File tree

21 files changed

+474
-55
lines changed

21 files changed

+474
-55
lines changed

logback-access-blackbox/pom.xml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
6+
<modelVersion>4.0.0</modelVersion>
7+
8+
<parent>
9+
<groupId>ch.qos.logback</groupId>
10+
<artifactId>logback-parent</artifactId>
11+
<version>1.4.2-SNAPSHOT</version>
12+
</parent>
13+
14+
<artifactId>logback-access-blackbox</artifactId>
15+
<packaging>jar</packaging>
16+
<name>Logback Access Blackbox Testing</name>
17+
<description>Logback Access Blackbox Testing Module</description>
18+
19+
<dependencies>
20+
<dependency>
21+
<groupId>ch.qos.logback</groupId>
22+
<artifactId>logback-access</artifactId>
23+
</dependency>
24+
25+
<dependency>
26+
<groupId>jakarta.servlet</groupId>
27+
<artifactId>jakarta.servlet-api</artifactId>
28+
</dependency>
29+
30+
<dependency>
31+
<groupId>jakarta.mail</groupId>
32+
<artifactId>jakarta.mail-api</artifactId>
33+
<scope>compile</scope>
34+
</dependency>
35+
36+
37+
</dependencies>
38+
39+
<build>
40+
<plugins>
41+
<plugin>
42+
<groupId>org.apache.maven.plugins</groupId>
43+
<artifactId>maven-surefire-plugin</artifactId>
44+
<executions>
45+
<execution>
46+
<id>default-test</id>
47+
<configuration>
48+
49+
<argLine>
50+
</argLine>
51+
<parallel>classes</parallel>
52+
<threadCount>8</threadCount>
53+
<!--<useUnlimitedThreads>false</useUnlimitedThreads>-->
54+
<forkCount>1C</forkCount>
55+
<reuseForks>true</reuseForks>
56+
<reportFormat>plain</reportFormat>
57+
<trimStackTrace>false</trimStackTrace>
58+
<!-- See https://issues.apache.org/jira/browse/SUREFIRE-1265 -->
59+
<!--<childDelegation>true</childDelegation>-->
60+
<useModulePath>true</useModulePath>
61+
62+
<excludes>
63+
</excludes>
64+
</configuration>
65+
</execution>
66+
67+
<execution>
68+
<id>singleJVM</id>
69+
<goals>
70+
<goal>test</goal>
71+
</goals>
72+
<configuration>
73+
<forkCount>4</forkCount>
74+
<reuseForks>false</reuseForks>
75+
<includes>
76+
</includes>
77+
</configuration>
78+
</execution>
79+
</executions>
80+
</plugin>
81+
82+
<plugin>
83+
<groupId>org.apache.maven.plugins</groupId>
84+
<artifactId>maven-deploy-plugin</artifactId>
85+
<configuration>
86+
<skip>true</skip>
87+
</configuration>
88+
</plugin>
89+
90+
</plugins>
91+
</build>
92+
</project>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<!DOCTYPE configuration>
3+
4+
<configuration>
5+
6+
<evaluator name="helloEval">
7+
<Expression>m.matches(message)</Expression>
8+
<matcher>
9+
<name>m</name>
10+
<regex>^hello.*</regex>
11+
<CaseSensitive>false</CaseSensitive>
12+
</matcher>
13+
</evaluator>
14+
15+
<appender name="STR_LIST"
16+
class="ch.qos.logback.core.testUtil.StringListAppender">
17+
<layout>
18+
<Pattern>%caller{4, helloEval}%d %level - %m%n</Pattern>
19+
</layout>
20+
</appender>
21+
22+
<root>
23+
<level value="DEBUG" />
24+
<appender-ref ref="STR_LIST" />
25+
</root>
26+
27+
28+
29+
</configuration>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<configuration>
2+
3+
<appender name="LIST"
4+
class="ch.qos.logback.core.read.ListAppender">
5+
6+
<filter class="ch.qos.logback.core.filter.EvaluatorFilter">
7+
<Name>myFilter</Name>
8+
<OnMatch>DENY</OnMatch>
9+
<Evaluator>
10+
<Name>mdcEvaluator</Name>
11+
<Expression>"to be ignored".equals(message)</Expression>
12+
</Evaluator>
13+
</filter>
14+
</appender>
15+
16+
<root level="debug">
17+
<appender-ref ref="LIST" />
18+
</root>
19+
</configuration>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<configuration>
2+
3+
<import class="ch.qos.logback.core.read.ListAppender"/>
4+
<import class="ch.qos.logback.core.filter.EvaluatorFilter"/>
5+
6+
<appender name="LIST" class="ListAppender">
7+
8+
<filter class="EvaluatorFilter">
9+
<Name>myFilter</Name>
10+
<OnMatch>DENY</OnMatch>
11+
<Evaluator>
12+
<Name>mdcEvaluator</Name>
13+
<Expression>"to be ignored".equals(message)</Expression>
14+
</Evaluator>
15+
</filter>
16+
</appender>
17+
18+
<root level="debug">
19+
<appender-ref ref="LIST" />
20+
</root>
21+
</configuration>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<configuration debug="false">
2+
3+
<appender name="LIST" class="ch.qos.logback.core.read.ListAppender"/>
4+
5+
<!-- Uncomment this property if you need the extra appender -->
6+
<!-- property name="EXTRA" value="ON" /> -->
7+
<if condition='isDefined("EXTRA")'>
8+
<then>
9+
<appender name="EXTRA_APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
10+
...
11+
</appender>
12+
</then>
13+
</if>
14+
15+
<root level="INFO">
16+
<appender-ref ref="LIST"/>
17+
<if condition='isDefined("EXTRA")'>
18+
<then>
19+
<appender-ref ref="EXTRA_APPENDER"/>
20+
</then>
21+
</if>
22+
</root>
23+
</configuration>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<configuration debug="false">
2+
3+
4+
5+
<appender name="LIST_THEN" class="ch.qos.logback.core.read.ListAppender"/>
6+
<appender name="LIST_ELSE" class="ch.qos.logback.core.read.ListAppender"/>
7+
8+
<root level="INFO"/>
9+
10+
<if condition='isDefined("EXTRA")'>
11+
<then>
12+
<root>
13+
<appender-ref ref="LIST_THEN"/>
14+
</root>
15+
</then>
16+
<else>
17+
<root>
18+
<appender-ref ref="LIST_ELSE"/>
19+
</root>
20+
</else>
21+
</if>
22+
</configuration>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<configuration debug="false">
2+
3+
<if condition='isDefined("EXTRA")'>
4+
<then>
5+
<appender name="EXTRA_APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
6+
...
7+
</appender>
8+
</then>
9+
</if>
10+
...
11+
12+
<root level="INFO">
13+
<appender-ref ref="CONSOLE" />
14+
<if condition='isDefined("EXTRA")'>
15+
<then>
16+
<appender-ref ref="EXTRA_APPENDER" />
17+
</then>
18+
</if>
19+
</root>
20+
21+
</configuration>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Logback: the reliable, generic, fast and flexible logging framework.
3+
* Copyright (C) 1999-2022, QOS.ch. All rights reserved.
4+
*
5+
* This program and the accompanying materials are dual-licensed under
6+
* either the terms of the Eclipse Public License v1.0 as published by
7+
* the Eclipse Foundation
8+
*
9+
* or (per the licensee's choosing)
10+
*
11+
* under the terms of the GNU Lesser General Public License version 2.1
12+
* as published by the Free Software Foundation.
13+
*/
14+
15+
package ch.qos.logback.classic.blackbox;
16+
17+
public class BlackboxClassicTestConstants {
18+
19+
public static final String TEST_SRC_PREFIX = "src/test/";
20+
public static final String TEST_INPUT_PREFIX = TEST_SRC_PREFIX + "blackboxInput/";
21+
public static final String JORAN_INPUT_PREFIX = TEST_INPUT_PREFIX + "joran/";
22+
}

0 commit comments

Comments
 (0)