Revert "Enable optional DEBUG level logs for query tests"
This reverts commit c54e6b5bfd.
Reason for revert: A similar feature to increase the logging level was
already added by: I00c203419db. Instead of adding a dedicated handling
of logging for query tests only, logging activation and configuration
should be generally extended to all tests derived from GerritBaseTests.
Change-Id: I7be6b13dcc74f5a108b5e32e4b0e7a8dec489963
This commit is contained in:
@@ -91,14 +91,10 @@ import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import org.apache.log4j.Level;
|
||||
import org.apache.log4j.LogManager;
|
||||
import org.eclipse.jgit.lib.PersonIdent;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.junit.After;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -150,20 +146,6 @@ public abstract class AbstractQueryAccountsTest extends GerritServerTests {
|
||||
|
||||
protected abstract Injector createInjector();
|
||||
|
||||
@BeforeClass
|
||||
public static void setLogLevel() {
|
||||
if (Boolean.getBoolean("debug")) {
|
||||
LogManager.getRootLogger().setLevel(Level.DEBUG);
|
||||
}
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void resetLogLevel() {
|
||||
if (Boolean.getBoolean("debug")) {
|
||||
LogManager.getRootLogger().setLevel(Level.INFO);
|
||||
}
|
||||
}
|
||||
|
||||
@Before
|
||||
public void setUpInjector() throws Exception {
|
||||
lifecycle = new LifecycleManager();
|
||||
|
||||
@@ -19,11 +19,9 @@ java_library(
|
||||
"//lib:guava",
|
||||
"//lib/guice",
|
||||
"//lib/jgit/org.eclipse.jgit:jgit",
|
||||
"//lib/log:log4j",
|
||||
"//lib/truth",
|
||||
"//lib/truth:truth-java8-extension",
|
||||
"//prolog:gerrit-prolog-common",
|
||||
"//resources:log4j-config",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -139,8 +139,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import org.apache.log4j.Level;
|
||||
import org.apache.log4j.LogManager;
|
||||
import org.eclipse.jgit.junit.TestRepository;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectInserter;
|
||||
@@ -152,9 +150,7 @@ import org.eclipse.jgit.revwalk.RevCommit;
|
||||
import org.eclipse.jgit.revwalk.RevWalk;
|
||||
import org.eclipse.jgit.util.SystemReader;
|
||||
import org.junit.After;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -218,20 +214,6 @@ public abstract class AbstractQueryChangesTest extends GerritServerTests {
|
||||
|
||||
protected abstract Injector createInjector();
|
||||
|
||||
@BeforeClass
|
||||
public static void setLogLevel() {
|
||||
if (Boolean.getBoolean("debug")) {
|
||||
LogManager.getRootLogger().setLevel(Level.DEBUG);
|
||||
}
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void resetLogLevel() {
|
||||
if (Boolean.getBoolean("debug")) {
|
||||
LogManager.getRootLogger().setLevel(Level.INFO);
|
||||
}
|
||||
}
|
||||
|
||||
@Before
|
||||
public void setUpInjector() throws Exception {
|
||||
lifecycle = new LifecycleManager();
|
||||
|
||||
@@ -26,9 +26,7 @@ java_library(
|
||||
"//lib/guice",
|
||||
"//lib/jgit/org.eclipse.jgit:jgit",
|
||||
"//lib/jgit/org.eclipse.jgit.junit:junit",
|
||||
"//lib/log:log4j",
|
||||
"//lib/truth",
|
||||
"//resources:log4j-config",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -68,12 +68,8 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Optional;
|
||||
import org.apache.log4j.Level;
|
||||
import org.apache.log4j.LogManager;
|
||||
import org.junit.After;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -119,20 +115,6 @@ public abstract class AbstractQueryGroupsTest extends GerritServerTests {
|
||||
|
||||
protected abstract Injector createInjector();
|
||||
|
||||
@BeforeClass
|
||||
public static void setLogLevel() {
|
||||
if (Boolean.getBoolean("debug")) {
|
||||
LogManager.getRootLogger().setLevel(Level.DEBUG);
|
||||
}
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void resetLogLevel() {
|
||||
if (Boolean.getBoolean("debug")) {
|
||||
LogManager.getRootLogger().setLevel(Level.INFO);
|
||||
}
|
||||
}
|
||||
|
||||
@Before
|
||||
public void setUpInjector() throws Exception {
|
||||
lifecycle = new LifecycleManager();
|
||||
|
||||
@@ -19,10 +19,8 @@ java_library(
|
||||
"//lib:guava",
|
||||
"//lib/guice",
|
||||
"//lib/jgit/org.eclipse.jgit:jgit",
|
||||
"//lib/log:log4j",
|
||||
"//lib/truth",
|
||||
"//lib/truth:truth-java8-extension",
|
||||
"//resources:log4j-config",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -68,12 +68,8 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
import org.apache.log4j.Level;
|
||||
import org.apache.log4j.LogManager;
|
||||
import org.junit.After;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -115,20 +111,6 @@ public abstract class AbstractQueryProjectsTest extends GerritServerTests {
|
||||
|
||||
protected abstract Injector createInjector();
|
||||
|
||||
@BeforeClass
|
||||
public static void setLogLevel() {
|
||||
if (Boolean.getBoolean("debug")) {
|
||||
LogManager.getRootLogger().setLevel(Level.DEBUG);
|
||||
}
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void resetLogLevel() {
|
||||
if (Boolean.getBoolean("debug")) {
|
||||
LogManager.getRootLogger().setLevel(Level.INFO);
|
||||
}
|
||||
}
|
||||
|
||||
@Before
|
||||
public void setUpInjector() throws Exception {
|
||||
lifecycle = new LifecycleManager();
|
||||
|
||||
@@ -20,9 +20,7 @@ java_library(
|
||||
"//lib:guava",
|
||||
"//lib/guice",
|
||||
"//lib/jgit/org.eclipse.jgit:jgit",
|
||||
"//lib/log:log4j",
|
||||
"//lib/truth",
|
||||
"//resources:log4j-config",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user