• Bug
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • amiller
  • Reporter: kkannaiy
  • October 01, 2009
  • 0
  • Watchers: 0
  • November 19, 2009
  • October 30, 2009



Hung Huynh 2009-10-22

JCacheTest - testReadWriteThreads, testGetValues, testLoadAll, testGetAll have been ignored

Alex Miller 2009-10-30

testGetValues(), testLoadAll(), and testGetAll() have one thread asynchronously loading 1000 entries with a CountingCacheLoader while the main thread puts a couple entries. They have assertion errors like this: “expected:<1000> but was:<2>”.

These failures are on a slow box. The CountingCacheLoader has a time delay whenever it puts a value but it also includes that time delay when building each entry in a putAll() which seems kind of silly as it’s not affecting the delay pattern on the map, just making the test take longer. The delay was set to average at 2 millisecond sleep per entry. The sleep resolution is probably much larger than that but that implies a total delay of at least 2 ms * 1000 entries = 2 seconds. The timer in the test is waiting 3 seconds. Given the likely bad timer resolution on the slow Sun box, this is probably way more, which is what’s causing the tests to fail there.

Given that the delays in the loadAll didn’t make sense, I’ve removed those (left them in load).

Alex Miller 2009-10-30

I’ve fixed the bulk of this. We may still see timing issues on testReadWriteThreads() - I did nothing to affect that but I believe it’s just slow boxes. Still watching and will make further changes as necessary.