From 40cc8cb85a93a74de8ba7a69858a1e0a9cf05f0a Mon Sep 17 00:00:00 2001 From: markrmiller Date: Thu, 9 Feb 2017 19:22:25 -0500 Subject: [PATCH] SOLR-10109: Capture 'free' commits and improve a couple timeouts. --- .../org/apache/solr/update/SoftAutoCommitTest.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 c4f5deea652..261a44b4704 100644 --- a/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java +++ b/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java @@ -258,7 +258,7 @@ public class SoftAutoCommitTest extends AbstractSolrTestCase { monitor.assertSaneOffers(); // Wait for the soft commit with some fudge - soft529 = monitor.soft.poll(softCommitWaitMillis * 3000, MILLISECONDS); + soft529 = monitor.soft.poll(softCommitWaitMillis * 5, MILLISECONDS); assertNotNull("soft529 wasn't fast enough", soft529); monitor.assertSaneOffers(); @@ -271,7 +271,7 @@ public class SoftAutoCommitTest extends AbstractSolrTestCase { assertU(adoc("id", "550", "subject", "just for noise/activity")); // wait for the hard commit - hard529 = monitor.hard.poll(hardCommitWaitMillis * 3, MILLISECONDS); + hard529 = monitor.hard.poll(hardCommitWaitMillis * 5, MILLISECONDS); assertNotNull("hard529 wasn't fast enough", hard529); monitor.assertSaneOffers(); @@ -296,9 +296,13 @@ public class SoftAutoCommitTest extends AbstractSolrTestCase { searcher529 + " !<= " + hard529, searcher529 <= hard529); - // wait for the last searcher we triggerd with 550 + // ensure we wait for the last searcher we triggered with 550 monitor.searcher.poll(5000, MILLISECONDS); + // ensure we wait for the commits on 550 + monitor.hard.poll(5000, MILLISECONDS); + monitor.soft.poll(5000, MILLISECONDS); + // clear commits monitor.hard.clear(); monitor.soft.clear();