Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Fixed SegmentTest test case time dependant occasional failures
luccioman36e9b1c5b384
diff --git a/source/net/yacy/kelondro/rwi/IndexCell.java b/source/net/yacy/kelondro/rwi/IndexCell.javaindex e124cba2a..d8b6c7f57 100644--- a/source/net/yacy/kelondro/rwi/IndexCell.java+++ b/source/net/yacy/kelondro/rwi/IndexCell.java@@ -153,6 +153,7 @@ public final class IndexCell<ReferenceType extends Reference> extends AbstractBu// get a fresh ram cacheIndexCell.this.ram = new ReferenceContainerCache<ReferenceType>(IndexCell.this.factory, termOrder, termSize);}+ // WARNING : if this cell is queried before this dump termination, terms are no longer in the cache and would therefore not be found// dump the bufferIndexCell.this.merger.dump(ramdump, dumpFile, IndexCell.this.array);IndexCell.this.lastDump = System.currentTimeMillis();diff --git a/test/java/net/yacy/search/index/SegmentTest.java b/test/java/net/yacy/search/index/SegmentTest.javaindex c75a54e14..c767b9d8d 100644--- a/test/java/net/yacy/search/index/SegmentTest.java+++ b/test/java/net/yacy/search/index/SegmentTest.java@@ -48,9 +48,13 @@ public class SegmentTest {new File("test/DATA/INDEX/webportal/SEGMENTS"),new File("test/DATA/INDEX/webportal/ARCHIVE"),null, null);++ /* Warning : ensure the size is larger than the maximum number of test terms added to the index, otherwise+ * query tests might randomly fail depending on when the index dump job (IndexCell.FlushThread) is run */+ final int entityCacheMaxSize = 20;// connect RWI index- index.connectRWI(10, 1024);+ index.connectRWI(entityCacheMaxSize, 1024);}@After