You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2014/07/28 23:44:44 UTC
svn commit: r1614195 - in /lucene/dev/branches/branch_4x: ./ solr/
solr/CHANGES.txt solr/core/
solr/core/src/test/org/apache/solr/cloud/CollectionsAPIAsyncDistributedZkTest.java
Author: shalin
Date: Mon Jul 28 21:44:44 2014
New Revision: 1614195
URL: http://svn.apache.org/r1614195
Log:
SOLR-6290: Harden and speed up CollectionsAPIAsyncDistributedZkTest
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/solr/ (props changed)
lucene/dev/branches/branch_4x/solr/CHANGES.txt (contents, props changed)
lucene/dev/branches/branch_4x/solr/core/ (props changed)
lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIAsyncDistributedZkTest.java
Modified: lucene/dev/branches/branch_4x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/CHANGES.txt?rev=1614195&r1=1614194&r2=1614195&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_4x/solr/CHANGES.txt Mon Jul 28 21:44:44 2014
@@ -235,6 +235,8 @@ Other Changes
* SOLR-6231: Increased timeouts and hardened the RollingRestartTest. (Noble Paul, shalin)
+* SOLR-6290: Harden and speed up CollectionsAPIAsyncDistributedZkTest. (Mark Miller, shalin)
+
================== 4.9.0 ==================
Versions of Major Components
Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIAsyncDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIAsyncDistributedZkTest.java?rev=1614195&r1=1614194&r2=1614195&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIAsyncDistributedZkTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIAsyncDistributedZkTest.java Mon Jul 28 21:44:44 2014
@@ -34,7 +34,7 @@ import java.io.IOException;
*/
@Slow
public class CollectionsAPIAsyncDistributedZkTest extends AbstractFullDistribZkTestBase {
-
+ private static final int MAX_TIMEOUT_SECONDS = 60;
private static final boolean DEBUG = false;
@Before
@@ -51,8 +51,8 @@ public class CollectionsAPIAsyncDistribu
public CollectionsAPIAsyncDistributedZkTest() {
fixShardCount = true;
- sliceCount = 2;
- shardCount = 4;
+ sliceCount = 1;
+ shardCount = 1;
}
@Override
@@ -67,16 +67,16 @@ public class CollectionsAPIAsyncDistribu
private void testSolrJAPICalls() throws Exception {
SolrServer server = createNewSolrServer("", getBaseUrl((HttpSolrServer) clients.get(0)));
- CollectionAdminRequest.createCollection("testasynccollectioncreation", 2, "conf1", server, "1001");
+ CollectionAdminRequest.createCollection("testasynccollectioncreation", 1, "conf1", server, "1001");
String state = null;
- state = getRequestStateAfterCompletion("1001", 10, server);
+ state = getRequestStateAfterCompletion("1001", MAX_TIMEOUT_SECONDS, server);
assertEquals("CreateCollection task did not complete!", "completed", state);
- CollectionAdminRequest.createCollection("testasynccollectioncreation", 2, "conf1", server, "1002");
+ CollectionAdminRequest.createCollection("testasynccollectioncreation", 1, "conf1", server, "1002");
- state = getRequestStateAfterCompletion("1002", 3, server);
+ state = getRequestStateAfterCompletion("1002", MAX_TIMEOUT_SECONDS, server);
assertEquals("Recreating a collection with the same name didn't fail, should have.", "failed", state);
@@ -85,12 +85,12 @@ public class CollectionsAPIAsyncDistribu
addReplica.setShardName("shard1");
addReplica.setAsyncId("1003");
server.request(addReplica);
- state = getRequestStateAfterCompletion("1003", 60, server);
+ state = getRequestStateAfterCompletion("1003", MAX_TIMEOUT_SECONDS, server);
assertEquals("Add replica did not complete", "completed", state);
CollectionAdminRequest.splitShard("testasynccollectioncreation", "shard1", server, "1004");
- state = getRequestStateAfterCompletion("1004", 60, server);
+ state = getRequestStateAfterCompletion("1004", MAX_TIMEOUT_SECONDS * 2, server);
assertEquals("Shard split did not complete. Last recorded state: " + state, "completed", state);
}