Andrea Aime ha scritto: > Hi, > today I was looking into a postgis issue and found > that many tests on trunk were broken. > Investigating I tracked down the issue at a commit Jody > made one month and a half ago, that enables the length > restriction parsing on attributes: > r31660, October 14 2008, "Make use of length if available" > > Which is nice, but breaks most equality tests used > to check the feature types are properly parsed in our > tests. > > Now, I'm wondering two things: > - why is the build box not running the postgis tests? > We must re-enable this, the normal dev build does > not run them
Thinking about this... were they actually even run? One has to modify the pom and some property files in the chechout to have the run > - Jody, did you run the tests before committing? > Fixing this requires a softer equality, one that > does not care about the restrictions, and that > needs to be propagated in quite a bit of places... > quite a bit of work! > For the short term I think the solution would be > to revert your changes and open a jira issue to > fix it properly? Looking at 2.4.x, DefaultAttributeType equality did not check for restriction equality and none of the subclasses that had actual restrictions overrode the inherited equality method. Yet the code on trunk is correct, two types with different restrictions are not equal. So I guess we need to write some lax tests for trunk, or have the tests use as a reference the exact feature type with all the expected restrictions (which could be good, but would also be a ton of work). In jdbc-ng a lax comparison approach is chosen instead, since there is basically no way two databases will return exactly the same feature type out of "create". Cheers Andrea -- Andrea Aime OpenGeo - http://opengeo.org Expert service straight from the developers. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel