MemoryDataStore lock tests fail at random.
------------------------------------------
Key: GEOT-1299
URL: http://jira.codehaus.org/browse/GEOT-1299
Project: GeoTools
Issue Type: Bug
Components: core main
Affects Versions: 2.4-M3
Reporter: Jody Garnett
Assignee: James Macgill
This one is silly .. but an interesting lesson in cpu design changes.
{code}
public void testGetFeatureLockingExpire() throws Exception {
FeatureLock lock = FeatureLockFactory.generate("Timed", 1);
FeatureLocking road = (FeatureLocking) data.getFeatureSource("road");
road.setFeatureLock(lock);
assertFalse(isLocked("road", "road.rd1"));
road.lockFeatures(rd1Filter);
assertTrue(isLocked("road", "road.rd1"));
Thread.sleep(50);
assertFalse(isLocked("road", "road.rd1"));
}
{code}
Andrea says:
There is no concurrency whatsoever here. The only thing
that may make it failing is the duration of the sleep itself,
which seems to be very small. On my computer for example I apparently cannot
measure time differences of time less than 15ms.
In fact, if I change the sleep time to be less than 15ms,
the test starts to randomly fail, and consistenly fails if I use
less than 5ms. Mine is a windows xp box.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel