mirror of https://github.com/apache/lucene.git
SOLR-5880: Try syncing solrj test solr.xml up with core test solr.xml.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1580922 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2de7c07f41
commit
69aee41967
|
@ -28,8 +28,16 @@
|
|||
adminPath: RequestHandler path to manage cores.
|
||||
If 'null' (or absent), cores will not be manageable via request handler
|
||||
-->
|
||||
<cores adminPath="/admin/cores" defaultCoreName="collection1" host="127.0.0.1" hostPort="${hostPort:8983}" hostContext="${hostContext:solr}" zkClientTimeout="8000" genericCoreNodeNames="${genericCoreNodeNames:true}">
|
||||
<cores adminPath="/admin/cores" defaultCoreName="collection1" host="127.0.0.1" hostPort="${hostPort:8983}"
|
||||
hostContext="${hostContext:solr}" zkClientTimeout="${solr.zkclienttimeout:30000}" shareSchema="${shareSchema:false}"
|
||||
genericCoreNodeNames="${genericCoreNodeNames:true}" leaderVoteWait="0"
|
||||
distribUpdateConnTimeout="${distribUpdateConnTimeout:45000}" distribUpdateSoTimeout="${distribUpdateSoTimeout:340000}">
|
||||
<core name="collection1" instanceDir="collection1" shard="${shard:}" collection="${collection:collection1}" />
|
||||
<!--config="${solrconfig:solrconfig.xml}" schema="${schema:schema.xml}"/-->
|
||||
<shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">
|
||||
<str name="urlScheme">${urlScheme:}</str>
|
||||
<int name="socketTimeout">${socketTimeout:90000}</int>
|
||||
<int name="connTimeout">${connTimeout:15000}</int>
|
||||
</shardHandlerFactory>
|
||||
</cores>
|
||||
</solr>
|
||||
|
|
|
@ -109,7 +109,7 @@ public class CloudSolrServerTest extends AbstractFullDistribZkTestBase {
|
|||
public CloudSolrServerTest() {
|
||||
super();
|
||||
sliceCount = 2;
|
||||
shardCount = 4;
|
||||
shardCount = 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -236,9 +236,16 @@ public class CloudSolrServerTest extends AbstractFullDistribZkTestBase {
|
|||
expectedBaseURLs.size() < requestCountsMap.size());
|
||||
|
||||
// Calculate a number of shard keys that route to the same shard.
|
||||
int n;
|
||||
if (TEST_NIGHTLY) {
|
||||
n = random().nextInt(999) + 1;
|
||||
} else {
|
||||
n = random().nextInt(9) + 1;
|
||||
}
|
||||
|
||||
List<String> sameShardRoutes = Lists.newArrayList();
|
||||
sameShardRoutes.add("0");
|
||||
for (int i = 1; i < 1000; i++) {
|
||||
for (int i = 1; i < n; i++) {
|
||||
String shardKey = Integer.toString(i);
|
||||
Collection<Slice> slices = router.getSearchSlicesSingle(shardKey, null, col);
|
||||
if (expectedSlices.equals(slices)) {
|
||||
|
@ -248,8 +255,8 @@ public class CloudSolrServerTest extends AbstractFullDistribZkTestBase {
|
|||
|
||||
assertTrue(sameShardRoutes.size() > 1);
|
||||
|
||||
// Do 1000 queries with _route_ parameter to the same shard
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
// Do N queries with _route_ parameter to the same shard
|
||||
for (int i = 0; i < n; i++) {
|
||||
ModifiableSolrParams solrParams = new ModifiableSolrParams();
|
||||
solrParams.set(CommonParams.Q, "*:*");
|
||||
solrParams.set(ShardParams._ROUTE_, sameShardRoutes.get(random().nextInt(sameShardRoutes.size())));
|
||||
|
@ -278,7 +285,7 @@ public class CloudSolrServerTest extends AbstractFullDistribZkTestBase {
|
|||
}
|
||||
}
|
||||
|
||||
assertEquals("Unexpected number of requests to expected URLs", 1000, increaseFromExpectedUrls);
|
||||
assertEquals("Unexpected number of requests to expected URLs", n, increaseFromExpectedUrls);
|
||||
assertEquals("Unexpected number of requests to unexpected URLs: " + numRequestsToUnexpectedUrls,
|
||||
0, increaseFromUnexpectedUrls);
|
||||
|
||||
|
@ -312,7 +319,6 @@ public class CloudSolrServerTest extends AbstractFullDistribZkTestBase {
|
|||
indexDoc(doc);
|
||||
}
|
||||
|
||||
@BadApple(bugUrl = "https://issues.apache.org/jira/browse/SOLR-5880")
|
||||
public void testShutdown() throws MalformedURLException {
|
||||
CloudSolrServer server = new CloudSolrServer("[ff01::114]:33332");
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue