mirror of https://github.com/apache/lucene.git
try to fix autocommit test failure on slow host
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@804731 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bb76127225
commit
71286043e4
|
@ -41,7 +41,7 @@ import org.apache.solr.util.AbstractSolrTestCase;
|
|||
* longer for a new searcher to be registered.
|
||||
*/
|
||||
class CommitListener implements SolrEventListener {
|
||||
public boolean triggered = false;
|
||||
public volatile boolean triggered = false;
|
||||
public void init(NamedList args) {}
|
||||
public void newSearcher(SolrIndexSearcher newSearcher, SolrIndexSearcher currentSearcher) {}
|
||||
public void postCommit() {
|
||||
|
@ -134,7 +134,9 @@ public class AutoCommitTest extends AbstractSolrTestCase {
|
|||
SolrCore core = h.getCore();
|
||||
DirectUpdateHandler2 updater = (DirectUpdateHandler2) core.getUpdateHandler();
|
||||
DirectUpdateHandler2.CommitTracker tracker = updater.tracker;
|
||||
tracker.timeUpperBound = 500;
|
||||
// too low of a number can cause a slow host to commit before the test code checks that it
|
||||
// isn't there... causing a failure at "shouldn't find any"
|
||||
tracker.timeUpperBound = 1000;
|
||||
tracker.docsUpperBound = -1;
|
||||
updater.commitCallbacks.add(trigger);
|
||||
|
||||
|
|
Loading…
Reference in New Issue