Dave,
Excellent - thank you.
I'll make that change.
Andy
On 25/08/18 15:27, Dave Reynolds wrote:
On 23/08/18 16:58, Andy Seaborne wrote:
Intermittent error - but twice today:
Actually, I've seen it before on a completely clean build but redoing
the build and it wasn't there.
Dave - what does the test do?
Not one of mine, it was added by stain to as part of fixing JENA-901.
Looks like it's to test that the limit on tabled goal size is being
applied. That table used to be unbounded, Stian's fix for 901 was to
introduce a Guava bounded cache.
Hard to believe the test is in error. At first glance it has no
non-determinism.
Looks like the bounded cache is set up to use weak references. There's
nothing I can see in the test code that forces the references to be held
so a carefully time GC could empty or part empty the cache.
I suspect replacing line 166 in that test:
assertEquals(MAX, engine.tabledGoals.size());
by
assertTrue( engine.tabledGoals.size() <= MAX )
would be enough to preserve the intent of the test (actually bounded)
while being insensitive to refs being collected.
Dave