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/20 00:19:36 UTC
[2/2] lucene-solr:master: SOLR-10109: SoftAutoCommitTest is too
fragile.
SOLR-10109: SoftAutoCommitTest is too fragile.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/f45a3711
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f45a3711
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f45a3711
Branch: refs/heads/master
Commit: f45a3711b182c49a8c9b04cfcb6b3052505deaef
Parents: 9533fa3
Author: markrmiller <ma...@apache.org>
Authored: Sun Feb 19 19:19:32 2017 -0500
Committer: markrmiller <ma...@apache.org>
Committed: Sun Feb 19 19:19:32 2017 -0500
----------------------------------------------------------------------
.../src/test/org/apache/solr/update/SoftAutoCommitTest.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f45a3711/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java b/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java
index 261a44b..bd84d32 100644
--- a/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java
+++ b/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java
@@ -98,6 +98,10 @@ public class SoftAutoCommitTest extends AbstractSolrTestCase {
CommitTracker hardTracker = updater.commitTracker;
CommitTracker softTracker = updater.softCommitTracker;
+ // wait out any leaked commits
+ monitor.soft.poll(softCommitWaitMillis * 2, MILLISECONDS);
+ monitor.hard.poll(hardCommitWaitMillis * 2, MILLISECONDS);
+
int startingHardCommits = hardTracker.getCommitCount();
int startingSoftCommits = softTracker.getCommitCount();
@@ -115,7 +119,7 @@ public class SoftAutoCommitTest extends AbstractSolrTestCase {
monitor.assertSaneOffers();
// Wait for the soft commit with some fudge
- Long soft529 = monitor.soft.poll(softCommitWaitMillis * 500, MILLISECONDS);
+ Long soft529 = monitor.soft.poll(softCommitWaitMillis * 5, MILLISECONDS);
assertNotNull("soft529 wasn't fast enough", soft529);
monitor.assertSaneOffers();
@@ -353,7 +357,7 @@ public class SoftAutoCommitTest extends AbstractSolrTestCase {
// note: counting from 1 for multiplication
for (int i = 1; i <= expectedSoft; i++) {
// Wait for the soft commit with plenty of fudge to survive nasty envs
- Long soft = monitor.soft.poll(softCommitWaitMillis * 2, MILLISECONDS);
+ Long soft = monitor.soft.poll(softCommitWaitMillis * 3, MILLISECONDS);
if (soft != null || i == 1) {
assertNotNull(i + ": soft wasn't fast enough", soft);
monitor.assertSaneOffers();