lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r804731 - /lucene/solr/trunk/src/test/org/apache/solr/update/AutoCommitTest.java
Date Sun, 16 Aug 2009 17:42:47 GMT
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);
     



Mime
View raw message