You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by yo...@apache.org on 2009/08/16 19:42:47 UTC
svn commit: r804731 -
/lucene/solr/trunk/src/test/org/apache/solr/update/AutoCommitTest.java
Author: yonik
Date: Sun Aug 16 17:42:47 2009
New Revision: 804731
URL: http://svn.apache.org/viewvc?rev=804731&view=rev
Log:
try to fix autocommit test failure on slow host
Modified:
lucene/solr/trunk/src/test/org/apache/solr/update/AutoCommitTest.java
Modified: lucene/solr/trunk/src/test/org/apache/solr/update/AutoCommitTest.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/update/AutoCommitTest.java?rev=804731&r1=804730&r2=804731&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/update/AutoCommitTest.java (original)
+++ lucene/solr/trunk/src/test/org/apache/solr/update/AutoCommitTest.java Sun Aug 16 17:42:47 2009
@@ -41,7 +41,7 @@
* 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 @@
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);