SOLR-1972: Ignore metrics threads in SolrJ tests

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1403667 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Alan Woodward 2012-10-30 11:19:32 +00:00
parent 14f821624b
commit 228ad7f439
2 changed files with 23 additions and 10 deletions

View File

@ -23,6 +23,7 @@ import java.util.List;
import junit.framework.Assert; import junit.framework.Assert;
import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.core.SolrCore; import org.apache.solr.core.SolrCore;
import org.junit.Rule; import org.junit.Rule;
import org.junit.rules.RuleChain; import org.junit.rules.RuleChain;
@ -31,7 +32,11 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule; import com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@ThreadLeakFilters(defaultFilters = true, filters = {
SolrIgnoredThreadsFilter.class
})
public class TestEmbeddedSolrServer extends AbstractEmbeddedSolrServerTestCase { public class TestEmbeddedSolrServer extends AbstractEmbeddedSolrServerTestCase {
@Rule @Rule

View File

@ -17,20 +17,17 @@
package org.apache.solr.client.solrj.embedded; package org.apache.solr.client.solrj.embedded;
import java.io.File; import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
import java.io.FileInputStream; import com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule;
import java.io.InputStreamReader;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.xpath.*;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.client.solrj.SolrQuery; import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServer; import org.apache.solr.client.solrj.SolrServer;
import org.apache.solr.client.solrj.request.AbstractUpdateRequest.ACTION; import org.apache.solr.client.solrj.request.AbstractUpdateRequest.ACTION;
import org.apache.solr.client.solrj.request.*; import org.apache.solr.client.solrj.request.CoreAdminRequest;
import org.apache.solr.client.solrj.request.QueryRequest;
import org.apache.solr.client.solrj.request.UpdateRequest;
import org.apache.solr.client.solrj.response.CoreAdminResponse; import org.apache.solr.client.solrj.response.CoreAdminResponse;
import org.apache.solr.common.SolrInputDocument; import org.apache.solr.common.SolrInputDocument;
import org.apache.solr.core.CoreContainer; import org.apache.solr.core.CoreContainer;
@ -44,12 +41,23 @@ import org.slf4j.LoggerFactory;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Node; import org.w3c.dom.Node;
import com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule; import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
/** /**
* *
* @since solr 1.3 * @since solr 1.3
*/ */
@ThreadLeakFilters(defaultFilters = true, filters = {
SolrIgnoredThreadsFilter.class
})
public class TestSolrProperties extends AbstractEmbeddedSolrServerTestCase { public class TestSolrProperties extends AbstractEmbeddedSolrServerTestCase {
protected static Logger log = LoggerFactory.getLogger(TestSolrProperties.class); protected static Logger log = LoggerFactory.getLogger(TestSolrProperties.class);