mirror of https://github.com/apache/lucene.git
configure this from build.xml instead of o.a.solr hack
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1085241 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6c3184cdb4
commit
cb1514dec7
|
@ -511,6 +511,8 @@
|
|||
<sysproperty key="tests.seed" value="${tests.seed}"/>
|
||||
<!-- set the Version that tests should run against -->
|
||||
<sysproperty key="tests.luceneMatchVersion" value="${tests.luceneMatchVersion}"/>
|
||||
<!-- for lucene we can be strict, and we don't want false fails even across methods -->
|
||||
<sysproperty key="tests.cleanthreads" value="perMethod"/>
|
||||
<!-- logging config file -->
|
||||
<sysproperty key="java.util.logging.config.file" value="${tests.loggingfile}"/>
|
||||
<!-- set whether or not nightly tests should run -->
|
||||
|
|
|
@ -148,6 +148,8 @@ public abstract class LuceneTestCase extends Assert {
|
|||
public static final boolean TEST_NIGHTLY = Boolean.parseBoolean(System.getProperty("tests.nightly", "false"));
|
||||
/** the line file used by LineFileDocs */
|
||||
public static final String TEST_LINE_DOCS_FILE = System.getProperty("tests.linedocsfile", "europarl.lines.txt.gz");
|
||||
/** whether or not to clean threads between test invocations: "false", "perMethod", "perClass" */
|
||||
public static final String TEST_CLEAN_THREADS = System.getProperty("tests.cleanthreads", "perClass");
|
||||
|
||||
private static final Pattern codecWithParam = Pattern.compile("(.*)\\(\\s*(\\d+)\\s*\\)");
|
||||
|
||||
|
@ -342,10 +344,12 @@ public abstract class LuceneTestCase extends Assert {
|
|||
|
||||
@AfterClass
|
||||
public static void afterClassLuceneTestCaseJ4() {
|
||||
int rogueThreads = threadCleanup("test class");
|
||||
if (rogueThreads > 0) {
|
||||
// TODO: fail here once the leaks are fixed.
|
||||
System.err.println("RESOURCE LEAK: test class left " + rogueThreads + " thread(s) running");
|
||||
if (! "false".equals(TEST_CLEAN_THREADS)) {
|
||||
int rogueThreads = threadCleanup("test class");
|
||||
if (rogueThreads > 0) {
|
||||
// TODO: fail here once the leaks are fixed.
|
||||
System.err.println("RESOURCE LEAK: test class left " + rogueThreads + " thread(s) running");
|
||||
}
|
||||
}
|
||||
String codecDescription;
|
||||
CodecProvider cp = CodecProvider.getDefault();
|
||||
|
@ -490,7 +494,7 @@ public abstract class LuceneTestCase extends Assert {
|
|||
assertTrue("ensure your setUp() calls super.setUp()!!!", setup);
|
||||
setup = false;
|
||||
BooleanQuery.setMaxClauseCount(savedBoolMaxClauseCount);
|
||||
if (!getClass().getName().startsWith("org.apache.solr")) {
|
||||
if ("perMethod".equals(TEST_CLEAN_THREADS)) {
|
||||
int rogueThreads = threadCleanup("test method: '" + getName() + "'");
|
||||
if (rogueThreads > 0) {
|
||||
System.err.println("RESOURCE LEAK: test method: '" + getName()
|
||||
|
|
Loading…
Reference in New Issue