Intermittent build failure in H2DataStoreFactoryTest.testTCP() cause by race condition --------------------------------------------------------------------------------------
Key: GEOT-3109 URL: http://jira.codehaus.org/browse/GEOT-3109 Project: GeoTools Issue Type: Bug Components: data h2 Affects Versions: 2.6.5, 2.7-M0 Reporter: Ben Caradoc-Davies H2DataStoreFactoryTest.testTCP() can fail if there is another H2DataStoreFactoryTest.testTCP() running concurrently. In this case, H2DataStoreFactoryTest.testTCP() failed on 2.6.x when it was unexpectedly able to connect to a server before it has started one. To what server did it connect? The server started by H2DataStoreFactoryTest.testTCP() for trunk, which had already passed the first check and started its own server. Unit tests that obtain exclusive access to unique system resources such as network sockets will be vulnerable to this kind of failure. {code} ------------------------------------------------------------------------------- Test set: org.geotools.data.h2.H2DataStoreFactoryTest ------------------------------------------------------------------------------- Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.131 sec <<< FAILURE! testTCP(org.geotools.data.h2.H2DataStoreFactoryTest) Time elapsed: 0.128 sec <<< FAILURE! junit.framework.AssertionFailedError: Should not have made a connection. at junit.framework.Assert.fail(Assert.java:47) at org.geotools.data.h2.H2DataStoreFactoryTest.testTCP(H2DataStoreFactoryTest.java:62) {code} -- 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 ------------------------------------------------------------------------------ _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel