Our JUnit rule org.apache.logging.log4j.junit.CleanFiles would come in handy here.
Gary ---------- Forwarded message ---------- From: <rgo...@apache.org> Date: Tue, Jan 10, 2017 at 7:17 AM Subject: logging-log4j2 git commit: Fix failing unit test To: comm...@logging.apache.org Repository: logging-log4j2 Updated Branches: refs/heads/master a686a4e8c -> ba4822b1c Fix failing unit test Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/ commit/ba4822b1 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/ba4822b1 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/ba4822b1 Branch: refs/heads/master Commit: ba4822b1cfb1d4d74ac7cd4ee9643b98b3e1d78e Parents: a686a4e Author: Ralph Goers <rgo...@nextiva.com> Authored: Tue Jan 10 08:13:05 2017 -0700 Committer: Ralph Goers <rgo...@nextiva.com> Committed: Tue Jan 10 08:17:43 2017 -0700 ---------------------------------------------------------------------- .../log4j/core/layout/ConcurrentLoggingWithJsonLayoutTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ ba4822b1/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/ ConcurrentLoggingWithJsonLayoutTest.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/ ConcurrentLoggingWithJsonLayoutTest.java b/log4j-core/src/test/java/ org/apache/logging/log4j/core/layout/ConcurrentLoggingWithJsonLayou tTest.java index e176eb4..39b6685 100644 --- a/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/ ConcurrentLoggingWithJsonLayoutTest.java +++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/ ConcurrentLoggingWithJsonLayoutTest.java @@ -28,6 +28,7 @@ import java.util.Set; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.junit.LoggerContextRule; +import org.junit.AfterClass; import org.junit.Before; import org.junit.ClassRule; import org.junit.Test; @@ -46,8 +47,8 @@ public class ConcurrentLoggingWithJsonLayoutTest { public static LoggerContextRule context = new LoggerContextRule("log4j2-json-layout.xml"); private static final String PATH = "target/test-json-layout.log"; - @Before - public void before() { + @AfterClass + public static void after() { new File(PATH).delete(); } -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Edition <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459> JUnit in Action, Second Edition <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021> Spring Batch in Action <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951> Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory