diff --git a/build.gradle b/build.gradle index c117b376..76b59fef 100644 --- a/build.gradle +++ b/build.gradle @@ -102,7 +102,7 @@ subprojects { subproject -> test { // suppress all console output during testing unless running `gradle -i` logging.captureStandardOutput(LogLevel.INFO) - jvmArgs "-Dlog4j.debug=true -javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=org.springframework.*" + jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=org.springframework.*" } task testAll() { diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/log4j/AmqpAppenderIntegrationTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/log4j/AmqpAppenderIntegrationTests.java index b95980ac..99d57ecd 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/log4j/AmqpAppenderIntegrationTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/log4j/AmqpAppenderIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2013 by the original author(s). + * Copyright (c) 2011-2014 by the original author(s). * * Licensed 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 @@ -29,6 +29,7 @@ import org.apache.log4j.Logger; import org.apache.log4j.MDC; import org.apache.log4j.spi.LoggingEvent; import org.junit.After; +import org.junit.AfterClass; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -48,6 +49,7 @@ import org.springframework.util.Log4jConfigurer; * @author Jon Brisbin * @author Gary Russell * @author Gunnar Hillert + * @author Artem Bilan */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "org.springframework.amqp.rabbit.log4j" }, loader = AnnotationConfigContextLoader.class) @@ -76,6 +78,11 @@ public class AmqpAppenderIntegrationTests { listenerContainer.shutdown(); } + @AfterClass + public static void reset() throws Exception { + Log4jConfigurer.initLogging("classpath:log4j.properties"); + } + @Test public void testInit() { final AtomicInteger count = new AtomicInteger();