You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2017/02/22 15:24:48 UTC
[4/5] lucene-solr:branch_6x: test: speed up test
test: speed up test
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/0b9e0256
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/0b9e0256
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/0b9e0256
Branch: refs/heads/branch_6x
Commit: 0b9e0256437d14181273350914a20eaf060f2dae
Parents: f8ddebc
Author: markrmiller <ma...@apache.org>
Authored: Wed Feb 22 09:56:59 2017 -0500
Committer: markrmiller <ma...@apache.org>
Committed: Wed Feb 22 10:17:53 2017 -0500
----------------------------------------------------------------------
.../test/org/apache/solr/cloud/HttpPartitionTest.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0b9e0256/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java b/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java
index 01a6c8e..ca95091 100644
--- a/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java
@@ -71,7 +71,7 @@ public class HttpPartitionTest extends AbstractFullDistribZkTestBase {
// To prevent the test assertions firing too fast before cluster state
// recognizes (and propagates) partitions
- protected static final long sleepMsBeforeHealPartition = 2000L;
+ protected static final long sleepMsBeforeHealPartition = 300;
// give plenty of time for replicas to recover when running in slow Jenkins test envs
protected static final int maxWaitSecsToSeeAllActive = 90;
@@ -338,16 +338,16 @@ public class HttpPartitionTest extends AbstractFullDistribZkTestBase {
log.info("Looked up max version bucket seed "+maxVersionBefore+" for core "+coreName);
// now up the stakes and do more docs
- int numDocs = 1000;
+ int numDocs = TEST_NIGHTLY ? 1000 : 100;
boolean hasPartition = false;
for (int d = 0; d < numDocs; d++) {
// create / restore partition every 100 docs
- if (d % 100 == 0) {
+ if (d % 10 == 0) {
if (hasPartition) {
proxy.reopen();
hasPartition = false;
} else {
- if (d >= 100) {
+ if (d >= 10) {
proxy.close();
hasPartition = true;
Thread.sleep(sleepMsBeforeHealPartition);
@@ -672,9 +672,9 @@ public class HttpPartitionTest extends AbstractFullDistribZkTestBase {
if (!allReplicasUp) {
try {
- Thread.sleep(1000L);
+ Thread.sleep(200L);
} catch (Exception ignoreMe) {}
- waitMs += 1000L;
+ waitMs += 200L;
}
} // end while