From: David ‘Bombe’ Roden Date: Mon, 17 Mar 2014 20:05:38 +0000 (+0100) Subject: Deactivate logging for the test. X-Git-Tag: v2~257 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=fc1b5d1d8283a2d9e630304946f6069efcdad3fb;p=rhynodge.git Deactivate logging for the test. --- diff --git a/src/test/java/net/pterodactylus/rhynodge/states/StateManagerTest.java b/src/test/java/net/pterodactylus/rhynodge/states/StateManagerTest.java index a7361f9..5837846 100644 --- a/src/test/java/net/pterodactylus/rhynodge/states/StateManagerTest.java +++ b/src/test/java/net/pterodactylus/rhynodge/states/StateManagerTest.java @@ -2,6 +2,8 @@ package net.pterodactylus.rhynodge.states; import static com.google.common.base.Charsets.UTF_8; import static com.google.common.base.Objects.equal; +import static org.apache.log4j.Level.OFF; +import static org.apache.log4j.Logger.getLogger; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; @@ -14,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Optional; import com.google.common.io.Files; import org.hamcrest.Matchers; +import org.junit.BeforeClass; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; @@ -30,6 +33,11 @@ public class StateManagerTest { private final File statePath; private final StateManager stateManager; + @BeforeClass + public static void deactivateLogging() { + getLogger(StateManager.class).setLevel(OFF); + } + public StateManagerTest() throws IOException { tempFolder.create(); statePath = tempFolder.newFolder();