mirror of https://github.com/apache/lucene.git
SOLR-5497: Try and explicit set so linger to 0
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1544913 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
739dae21da
commit
1f2baa27f3
|
@ -227,6 +227,7 @@ public class JettySolrRunner {
|
||||||
: new SelectChannelConnector();
|
: new SelectChannelConnector();
|
||||||
c.setReuseAddress(true);
|
c.setReuseAddress(true);
|
||||||
c.setLowResourcesMaxIdleTime(1500);
|
c.setLowResourcesMaxIdleTime(1500);
|
||||||
|
c.setSoLingerTime(0);
|
||||||
connector = c;
|
connector = c;
|
||||||
threadPool = (QueuedThreadPool) c.getThreadPool();
|
threadPool = (QueuedThreadPool) c.getThreadPool();
|
||||||
} else if ("Socket".equals(connectorName)) {
|
} else if ("Socket".equals(connectorName)) {
|
||||||
|
@ -234,6 +235,7 @@ public class JettySolrRunner {
|
||||||
? new SslSocketConnector(sslcontext)
|
? new SslSocketConnector(sslcontext)
|
||||||
: new SocketConnector();
|
: new SocketConnector();
|
||||||
c.setReuseAddress(true);
|
c.setReuseAddress(true);
|
||||||
|
c.setSoLingerTime(0);
|
||||||
connector = c;
|
connector = c;
|
||||||
threadPool = (QueuedThreadPool) c.getThreadPool();
|
threadPool = (QueuedThreadPool) c.getThreadPool();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -17,17 +17,35 @@
|
||||||
|
|
||||||
package org.apache.solr;
|
package org.apache.solr;
|
||||||
|
|
||||||
import com.carrotsearch.randomizedtesting.RandomizedContext;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
|
|
||||||
import com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.StringWriter;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Properties;
|
||||||
|
import java.util.logging.ConsoleHandler;
|
||||||
|
import java.util.logging.Handler;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import javax.xml.xpath.XPathExpressionException;
|
||||||
|
|
||||||
import org.apache.commons.codec.Charsets;
|
import org.apache.commons.codec.Charsets;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.lucene.analysis.MockAnalyzer;
|
import org.apache.lucene.analysis.MockAnalyzer;
|
||||||
import org.apache.lucene.index.IndexWriterConfig;
|
import org.apache.lucene.index.IndexWriterConfig;
|
||||||
import org.apache.lucene.util.IOUtils;
|
import org.apache.lucene.util.IOUtils;
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
import org.apache.lucene.util._TestUtil;
|
|
||||||
import org.apache.lucene.util.QuickPatchThreadsFilter;
|
import org.apache.lucene.util.QuickPatchThreadsFilter;
|
||||||
|
import org.apache.lucene.util._TestUtil;
|
||||||
import org.apache.solr.client.solrj.util.ClientUtils;
|
import org.apache.solr.client.solrj.util.ClientUtils;
|
||||||
import org.apache.solr.common.SolrException;
|
import org.apache.solr.common.SolrException;
|
||||||
import org.apache.solr.common.SolrInputDocument;
|
import org.apache.solr.common.SolrInputDocument;
|
||||||
|
@ -68,25 +86,9 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.xml.sax.SAXException;
|
import org.xml.sax.SAXException;
|
||||||
|
|
||||||
import javax.xml.xpath.XPathExpressionException;
|
import com.carrotsearch.randomizedtesting.RandomizedContext;
|
||||||
import java.io.File;
|
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
|
||||||
import java.io.IOException;
|
import com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule;
|
||||||
import java.io.StringWriter;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Properties;
|
|
||||||
import java.util.logging.ConsoleHandler;
|
|
||||||
import java.util.logging.Handler;
|
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A junit4 Solr test harness that extends LuceneTestCaseJ4. To change which core is used when loading the schema and solrconfig.xml, simply
|
* A junit4 Solr test harness that extends LuceneTestCaseJ4. To change which core is used when loading the schema and solrconfig.xml, simply
|
||||||
|
@ -100,7 +102,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
})
|
})
|
||||||
public abstract class SolrTestCaseJ4 extends LuceneTestCase {
|
public abstract class SolrTestCaseJ4 extends LuceneTestCase {
|
||||||
private static String coreName = ConfigSolrXmlOld.DEFAULT_DEFAULT_CORE_NAME;
|
private static String coreName = ConfigSolrXmlOld.DEFAULT_DEFAULT_CORE_NAME;
|
||||||
public static int DEFAULT_CONNECTION_TIMEOUT = 15000; // default socket connection timeout in ms
|
public static int DEFAULT_CONNECTION_TIMEOUT = 30000; // default socket connection timeout in ms
|
||||||
|
|
||||||
|
|
||||||
@ClassRule
|
@ClassRule
|
||||||
|
|
|
@ -1738,6 +1738,7 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
|
||||||
try {
|
try {
|
||||||
commondCloudSolrServer = new CloudSolrServer(zkServer.getZkAddress(),
|
commondCloudSolrServer = new CloudSolrServer(zkServer.getZkAddress(),
|
||||||
random().nextBoolean());
|
random().nextBoolean());
|
||||||
|
commondCloudSolrServer.getLbServer().setConnectionTimeout(30000);
|
||||||
commondCloudSolrServer.setParallelUpdates(random().nextBoolean());
|
commondCloudSolrServer.setParallelUpdates(random().nextBoolean());
|
||||||
commondCloudSolrServer.setDefaultCollection(DEFAULT_COLLECTION);
|
commondCloudSolrServer.setDefaultCollection(DEFAULT_COLLECTION);
|
||||||
commondCloudSolrServer.connect();
|
commondCloudSolrServer.connect();
|
||||||
|
|
Loading…
Reference in New Issue