mirror of https://github.com/qos-ch/slf4j
parent
b4803aaf56
commit
2af556252c
|
|
@ -26,7 +26,6 @@
|
|||
</licenses>
|
||||
|
||||
<properties>
|
||||
<jdk.version>${jdk9.version}</jdk.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
</licenses>
|
||||
|
||||
<properties>
|
||||
<jdk.version>${jdk9.version}</jdk.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
</licenses>
|
||||
|
||||
<properties>
|
||||
<jdk.version>${jdk9.version}</jdk.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
|
|||
|
|
@ -29,9 +29,7 @@
|
|||
<project.build.outputTimestamp>2024-01-02T19:42:00Z</project.build.outputTimestamp>
|
||||
<latest.1.version>1.7.36</latest.1.version>
|
||||
<!-- java.util.ServiceLoader requires Java 6 -->
|
||||
<jdk.version>8</jdk.version>
|
||||
<!-- used in test modules, unpublished modules or where it does not matter -->
|
||||
<jdk9.version>9</jdk9.version>
|
||||
<jdk.version>11</jdk.version>
|
||||
<maven.compiler.source>${jdk.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${jdk.version}</maven.compiler.target>
|
||||
|
||||
|
|
@ -148,31 +146,6 @@
|
|||
<release>${jdk.version}</release>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<id>default-testCompile</id>
|
||||
<goals>
|
||||
<goal>testCompile</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<release>${jdk.version}</release>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<id>module-compile</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<release>9</release>
|
||||
<compileSourceRoots>
|
||||
<compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>
|
||||
</compileSourceRoots>
|
||||
<multiReleaseOutput>true</multiReleaseOutput>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
||||
</plugin>
|
||||
|
|
|
|||
|
|
@ -75,28 +75,6 @@
|
|||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<executions>
|
||||
|
||||
<execution>
|
||||
<id>module-compile</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<release>${jdk9.version}</release>
|
||||
<compileSourceRoots>
|
||||
<compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>
|
||||
</compileSourceRoots>
|
||||
<multiReleaseOutput>true</multiReleaseOutput>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
<url>https://www.slf4j.org</url>
|
||||
|
||||
<properties>
|
||||
<jdk.version>${jdk9.version}</jdk.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
@ -39,37 +38,6 @@
|
|||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- target Java 9+ -->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.apache.maven.plugins</groupId>-->
|
||||
<!-- <artifactId>maven-compiler-plugin</artifactId>-->
|
||||
<!-- <version>${maven-compiler-plugin.version}</version>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <id>default-compile</id>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>compile</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <source>9</source>-->
|
||||
<!-- <target>9</target>-->
|
||||
<!-- <release>9</release>-->
|
||||
<!-- </configuration> -->
|
||||
<!-- </execution>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <id>default-testCompile</id>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>testCompile</goal> -->
|
||||
<!-- </goals>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <source>9</source>-->
|
||||
<!-- <target>9</target>-->
|
||||
<!-- <release>9</release>-->
|
||||
<!-- </configuration> -->
|
||||
<!-- </execution> -->
|
||||
<!-- </executions> -->
|
||||
<!-- </plugin>-->
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
|
|
|
|||
|
|
@ -40,31 +40,7 @@
|
|||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<executions>
|
||||
|
||||
<execution>
|
||||
<id>module-compile</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<release>${jdk9.version}</release>
|
||||
<compileSourceRoots>
|
||||
<compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>
|
||||
</compileSourceRoots>
|
||||
<multiReleaseOutput>true</multiReleaseOutput>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -40,28 +40,6 @@
|
|||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<executions>
|
||||
|
||||
<execution>
|
||||
<id>module-compile</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<release>${jdk9.version}</release>
|
||||
<compileSourceRoots>
|
||||
<compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>
|
||||
</compileSourceRoots>
|
||||
<multiReleaseOutput>true</multiReleaseOutput>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ import org.slf4j.LoggerFactory;
|
|||
import org.slf4j.LoggerFactoryFriend;
|
||||
|
||||
import java.io.PrintStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.BrokenBarrierException;
|
||||
import java.util.concurrent.CyclicBarrier;
|
||||
|
|
|
|||
|
|
@ -52,18 +52,53 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<forkCount>1</forkCount>
|
||||
<reuseForks>false</reuseForks>
|
||||
<reportFormat>plain</reportFormat>
|
||||
<trimStackTrace>false</trimStackTrace>
|
||||
<excludes>
|
||||
<exclude>**/AllTest.java</exclude>
|
||||
<exclude>**/PackageTest.java</exclude>
|
||||
</excludes>
|
||||
<!--<argLine>-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8001</argLine> -->
|
||||
<!--<argLine>XXadd-opens log4j/org.apache.log4j=org.slf4j.log4j12</argLine>-->
|
||||
<!--
|
||||
java.lang.IllegalAccessException: class org.apache.log4j.helpers.OptionConverter
|
||||
(in module ch.qos.reload4j) cannot access class org.slf4j.reload4j.testHarness.RecursiveAppender
|
||||
(in module org.slf4j.reload4j) because module org.slf4j.reload4j does not export org.slf4j.reload4j.testHarness
|
||||
to module ch.qos.reload4j
|
||||
|
||||
-->
|
||||
<argLine>
|
||||
--add-opens org.slf4j.reload4j/org.slf4j.reload4j.testHarness=ch.qos.reload4j
|
||||
</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <id>default-test</id>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <parallel>classes</parallel>-->
|
||||
<!-- <threadCount>8</threadCount>-->
|
||||
<!-- <forkCount>1C</forkCount>-->
|
||||
<!-- <reuseForks>true</reuseForks>-->
|
||||
<!-- <reportFormat>plain</reportFormat>-->
|
||||
<!-- <trimStackTrace>false</trimStackTrace>-->
|
||||
<!-- <excludes>-->
|
||||
<!-- <exclude>**/AllTest.java</exclude>-->
|
||||
<!-- <exclude>**/PackageTest.java</exclude>-->
|
||||
<!-- <exclude>org.slf4j.reload4j.EventFieldsTest</exclude>-->
|
||||
<!-- <exclude>org.slf4j.testing.MultithreadedInitializationTest</exclude>-->
|
||||
<!-- </excludes>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- </execution>-->
|
||||
|
||||
<!-- <execution>-->
|
||||
<!-- <id>singleJVM</id>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>test</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <forkCount>4</forkCount>-->
|
||||
<!-- <reuseForks>false</reuseForks>-->
|
||||
<!-- <includes>-->
|
||||
<!-- <include>org.slf4j.testing.MultithreadedInitializationTest</include>-->
|
||||
<!-- <include>org.slf4j.reload4j.EventFieldsTest</include>-->
|
||||
<!-- </includes>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
|
|
|||
|
|
@ -41,28 +41,6 @@
|
|||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<executions>
|
||||
|
||||
<execution>
|
||||
<id>module-compile</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<release>${jdk9.version}</release>
|
||||
<compileSourceRoots>
|
||||
<compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>
|
||||
</compileSourceRoots>
|
||||
<multiReleaseOutput>true</multiReleaseOutput>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
</build>
|
||||
|
|
|
|||
|
|
@ -18,9 +18,7 @@
|
|||
<url>http://www.slf4j.org</url>
|
||||
|
||||
<properties>
|
||||
<jdk.version>${jdk9.version}</jdk.version>
|
||||
<module-name>org.slf4j.testing</module-name>
|
||||
<maven.compiler.release>${jdk9.version}</maven.compiler.release>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
@ -46,24 +44,6 @@
|
|||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.apache.maven.plugins</groupId>-->
|
||||
<!-- <artifactId>maven-compiler-plugin</artifactId>-->
|
||||
<!-- <version>${maven-compiler-plugin.version}</version>-->
|
||||
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <id>default-compile</id>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>compile</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- <configuration combine.self="override">-->
|
||||
<!-- <release>${jdk9.version}</release>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
package org.slf4j.testing;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.slf4j.event.EventRecordingLogger;
|
||||
import org.slf4j.helpers.SubstituteLogger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
|
@ -10,14 +13,10 @@ import java.util.concurrent.BrokenBarrierException;
|
|||
import java.util.concurrent.CyclicBarrier;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.slf4j.event.EventRecordingLogger;
|
||||
import org.slf4j.helpers.SubstituteLogger;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
abstract public class MultithreadedInitializationTest {
|
||||
final protected static int THREAD_COUNT = 4 + Runtime.getRuntime().availableProcessors() * 2;
|
||||
final protected static int THREAD_COUNT = 1;//4 + Runtime.getRuntime().availableProcessors() * 2;
|
||||
|
||||
private final List<Logger> createdLoggers = Collections.synchronizedList(new ArrayList<>());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue