Strange build error after "svn update" (r38224)
-----------------------------------------------

                 Key: GEOT-3914
                 URL: https://jira.codehaus.org/browse/GEOT-3914
             Project: GeoTools
          Issue Type: Bug
          Components: process
    Affects Versions: 8.0-M2
         Environment: 2.6.32-34-generic, Eclipse 3.6.1, Maven 2.2.1
            Reporter: Kenneth Gulbrandsøy
         Attachments: unit-test-errors-illegal-attribute-names-16102011.patch

Hi folks!

Before committing GEOT-3839 I wanted to be sure that the patch passed all unit 
tests again. After running "svn update" on trunk  "mvn clean install -Dall" now 
fails on gt-process-feature. This is strange, because all gt-process-feature 
unit tests passes on hudson. The tests that contains errors (no failures) are 
[AggregateProcessTest|http://hudson.opengeo.org/hudson/view/geotools/job/geotools-trunk/ws/gt_trunk/modules/unsupported/process-feature/src/test/java/org/geotools/process/feature/gs/AggregateProcessTest.java]
 and 
[FeatureGSProcessFactoryFactoryTest|http://hudson.opengeo.org/hudson/view/geotools/job/geotools-trunk/ws/gt_trunk/modules/unsupported/process-feature/src/test/java/org/geotools/process/feature/gs/FeatureGSProcessFactoryFactoryTest.java].
 

The following errors are written out to the sure-fire-reports

{code}
-------------------------------------------------------------------------------
Test set: org.geotools.process.feature.gs.AggregateProcessTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.735 sec <<< 
FAILURE!
testSum(org.geotools.process.feature.gs.AggregateProcessTest)  Time elapsed: 
0.724 sec  <<< ERROR!
org.geotools.process.ProcessException: Could not find attribute 
[GeometryDescriptorImpl the_geom <the_geom:MultiLineString> nillable 0:1, 
AttributeDescriptorImpl cat2 <cat2:Long> nillable 0:1, AttributeDescriptorImpl 
str1 <str1:String> nillable 0:1] the valid values are [the_geom, cat2, str1]
        at 
org.geotools.process.feature.gs.AggregateProcess.execute(AggregateProcess.java:93)
{code}

The clue to what is wrong (only locally it seems since Hudson does not 
complain) is a _missing property_. After some quick debugging I found the 
problem to be a mismatch between the aggregate attribute name passed to 
[AggregateProcess#process|http://hudson.opengeo.org/hudson/view/geotools/job/geotools-trunk/ws/gt_trunk/modules/unsupported/process-feature/src/main/java/org/geotools/process/feature/gs/AggregateProcess.java]
 ("cat") and the attribute name in 
[polyline.properties|http://hudson.opengeo.org/hudson/view/geotools/job/geotools-trunk/ws/gt_trunk/modules/unsupported/process-feature/src/test/resources/org/geotools/process/feature/gs/test-data/polyline.properties]
 ("cat2") located in the 
[test-data|http://hudson.opengeo.org/hudson/view/geotools/job/geotools-trunk/ws/gt_trunk/modules/unsupported/process-feature/src/test/resources/org/geotools/process/feature/gs/test-data/]
 catalog.

Changing from "cat" to "cat2" in the tests solves the problem. The strange part 
however, is that the tests pass on Hudson. Inspecting the files (use urls above 
to see it yourself) show that they contain the same attribute names as mine did 
before the change from "cat" to "cat2". Maybe I'm just stupid for not 
understanding why this passes on Hudson :-D

I have attached a patch with the changes I made to make it pass locally. I also 
updated the error message thrown when a unknown attribute name is passed to 
AggregateProcess (the current is wrong I believe).

BEFORE:

{code}
org.geotools.process.ProcessException: Could not find attribute 
[GeometryDescriptorImpl the_geom <the_geom:MultiLineString> nillable 0:1, 
AttributeDescriptorImpl cat2 <cat2:Long> nillable 0:1, AttributeDescriptorImpl 
str1 <str1:String> nillable 0:1] the valid values are [the_geom, cat2, str1]
{code}

AFTER:

{code}
org.geotools.process.ProcessException: Could not find attribute [cat]  the 
valid values are [the_geom, cat2, str1]
{code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to