Permalink
Browse files

Fixed SegmentTest test case time dependant occasional failures

As highlighted by latest automated Travis builds.
  • Loading branch information...
luccioman committed Jan 2, 2018
1 parent 8a4ea1c commit 36e9b1c5b3846d6e8a188fab39667b38150132a4
@@ -153,6 +153,7 @@ private void flushBuffer() {
// 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 void setUp() throws IOException {
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

0 comments on commit 36e9b1c

Please sign in to comment.