Andrea Aime a écrit :
> Now, it's in our interest to keep test code coverage high, but also to 
> keep build relatively fast so that people can build frequently.
> I still don't know about main and indexed shapefile, but I have some 
> ideas about epsg-hsql. In my opinion, most of the unit test time is spent 
> checking 
> the database contents, because the test goes thru every single row of the 
> most 
> important tables in the database (the DefaultDataSourceTest).
> Now, this is important, but it's also something that needs to be done 
> only once, when the database is updated.

Actually the tests are not about testing the database content, but about 
Geotools capability to 
create the right objects from the database content, and two fill those objects 
with the correct 
informations. The epsg-hsql test suite has actually been one of the most 
critical test suite in the 
"referencing" module development. Many bugs introduced while refactoring the 
"referencing" module 
were undetected by the "referencing" test suite, and detected only by the 
"epsg-hsql" test suite 
(StackOverFlowError, "Conversion" instances wrongly created when it should have 
been 
"Transformation" instances, wrong accuracy, etc.).

The "epsg-hsql" test suite should really be executed after every change in the 
"referencing" module, 
because many bugs are detected only at this level. I realize that this 
situation suggests a lack of 
coverage of the "referencing" test suite. To our defense, the "referencing" 
test suite work 
reasonably well for CRS created by Well Known Text. But the EPSG database is 
much richer than WKT, 
and many "module/referencing" features are hard to test without a real EPSG 
database. Features that 
can't be tested with CRS created from WKT includes: area of validity, 
geographic bounding box, 
accuracy, alias, sexagesimal units (when we will use JScience unit framework), 
explicitly defined 
coordinate operations, scope, remarks, etc.

However, if we want to speed-up the "epsg-hsql" test suite anyway, there is a 
choice. We can create 
either a new profile in our pom.xml file (something like "fast.tests"), or 
define a system property 
(again "fast.tests"), and disable the slowest tests when this property is set. 
We have to decide 
whatever disabling the slow tests should be the default or not.


> [INFO] EPSG Authority Service using HSQL database ............ SUCCESS 
> [2:28.313s]
> [INFO] Indexed shapefile module .............................. SUCCESS 
> [51.797s]

So I'm the only one with a very slow "Indexed Shapefile module"? On the Linux 
machine I use for 
building, "Indexed Shapefile" takes 7:18 compared to 2:16 for epsg-hsql, which 
is why I considered 
the epsg-hsql test time as somewhat secondary...

        Martin.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to