Fixed SegmentTest test case time dependant occasional failures

As highlighted by latest automated Travis builds.
pull/154/head
luccioman 7 years ago
parent 8a4ea1c11e
commit 36e9b1c5b3

@ -153,6 +153,7 @@ public final class IndexCell<ReferenceType extends Reference> extends AbstractBu
// get a fresh ram cache
IndexCell.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 buffer
IndexCell.this.merger.dump(ramdump, dumpFile, IndexCell.this.array);
IndexCell.this.lastDump = System.currentTimeMillis();

@ -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

Loading…
Cancel
Save