Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WFS test failure only when running REST tests against production docker image #109

Open
aaime opened this issue Dec 26, 2024 · 1 comment · May be fixed by opengeospatial/teamengine#630
Assignees

Comments

@aaime
Copy link

aaime commented Dec 26, 2024

Describe the bug
Running basic WFS 1.1 via the rest API tests I get a number of the following errors:

   <starttest defaultResult="1" file="/usr/local/tomcat/te_base/work/te_base_scripts_wfs_1.1.0_ctl_main-auto.ctl/ctl1$SchematronValidatingParser.test" local-name="SchematronValidatingParser" namespace-uri="http://www.occamlab.com/ctl" pat
h="s0001/d1e39011_1/d1e29142_1/d1e1500_1/d1e2864_1" prefix="ctl" type="Mandatory">
      <assertion>Validate an XML instance against a Schematron schema using the given phase.</assertion>
      <params xmlns:tems="java:com.occamlab.te.web.MonitorServlet" xmlns:myparsers="http://teamengine.sourceforge.net/parsers" xmlns:wfs="http://www.opengis.net/wfs" xmlns:parsers="http://www.occamlab.com/te/parsers" xmlns:xsd="http://www
.w3.org/2001/XMLSchema" xmlns:ows="http://www.opengis.net/ows" xmlns:saxon="http://saxon.sf.net/" xmlns:p="http://teamengine.sourceforge.net/parsers" xmlns:gen="java:com.occamlab.te.Generator" xmlns:te="http://www.occamlab.com/te" xmlns:s
f="http://cite.opengeospatial.org/gmlsf" xmlns:tec="java:com.occamlab.te.TECore" xmlns:ctl="http://www.occamlab.com/ctl" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink">
         <param local-name="doc" namespace-uri="" prefix="" type="document-node(element({http://www.opengis.net/ows}ExceptionReport, xs:anyType))">
            <value>
               <ows:ExceptionReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/ows http://geoserver:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd">
                  <ows:Exception exceptionCode="MissingParameterValue" locator="service">
                     <ows:ExceptionText>Could not determine service</ows:ExceptionText>
                  </ows:Exception>
                  <!--Response received in [530] milliseconds--></ows:ExceptionReport>
            </value>
         </param>
         <param local-name="schema" namespace-uri="" prefix="" type="document-node()">
            <value>/sch/ows/1.0.0/ExceptionReport.sch</value>
         </param>
         <param local-name="phase" namespace-uri="" prefix="" type="document-node()">
            <value>MissingParameterValuePhase</value>
         </param>
      </params>
   </starttest>
   <message id="d1e633_1">Total number of errors detected: 1</message>
   <message id="d1e639_1">Error 1: assertion failed:
  The exception report must have @version = "1.2.0".
  The reported version number is 1.1.0.
</message>
   <endtest result="6"/>

However, the same test run from the HTML UI works without problems.

To Reproduce
Steps to reproduce the behavior:

  1. docker run -p 8004:8080 --rm ogccite/teamengine-production
  2. curl -u ogctest:ogctest -H "Accept: application/xml" "http://localhost:8004/teamengine/rest/suites/wfs/run?capabilities-url=http%3A%2F%2Fgeoserver%3A8080%2Fgeoserver%2Fwfs%3Fservice=WFS%26request%3DGetCapabilities%26version%3D1.1.0&profile=sf-0"
  3. Check the results

Expected behavior
The tests should behave consistently, regardless of how they are executed.

Considerations
Grepping the ETS WFS 1.1 sources, the error message is not even found (not even part of it).
However, the production docker image has several test suites, so I suspected cross-test pollution and classpath lookups.
Regarding cross test pollution, I've found the error message in the same named, same path file in CSW 2.0.2 test suite...
But then I've tried to build a docker image with just ETS WFS 1.1, and the issue was still there.

Then found that for some reason, Teamengine itself has a "sch/ows/1.0.0/ExceptionReport.sch" with that error message:

https://github.com/opengeospatial/teamengine/blob/master/teamengine-web/src/main/resources/sch/ows/1.0.0/ExceptionReport.sch#L52

When building, this file ends up in ``WEB-INF/classes".

So if the REST test were to use the classpath, then they would always pick up the file in teamegine/WEB-INF/classes rather than the one in the ets-wfs11 jar.
Funny enough, the file seems to have gotten in some 9 years ago as an attempt to address test suite failures, in a commit that involved CSW 2.0 changes: opengeospatial/teamengine@ad07d5a

@aaime aaime changed the title WFS test failure only when running REST tests against production WFS test failure only when running REST tests against production docker image Dec 26, 2024
@dstenger
Copy link
Contributor

dstenger commented Jan 2, 2025

Thank you for reporting.
We will do further investigation.

@dstenger dstenger added this to CITE Jan 2, 2025
@github-project-automation github-project-automation bot moved this to To do in CITE Jan 2, 2025
@bpross-52n bpross-52n moved this from To do to Needs discussion in CITE Feb 5, 2025
@bpross-52n bpross-52n moved this from Needs discussion to In progress in CITE Feb 5, 2025
@dstenger dstenger moved this from In progress to To verify in CITE Feb 27, 2025
@dstenger dstenger assigned dstenger and unassigned bpross-52n Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To verify
Development

Successfully merging a pull request may close this issue.

3 participants