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

Test deletedFeatureIsRetired (Feature versions) requests wrong version of feature #51

Closed
dstenger opened this issue Oct 17, 2016 · 2 comments
Assignees

Comments

@dstenger
Copy link
Contributor

We detected a bug in test deletedFeatureIsRetired.
The test deletedFeatureIsRetired requests the last version of a feature after having deleted it. The parameter version="LAST" is used for that.

The problem is that the test does not request the last version as version="LAST" is set after the request has already been sent.

Line 243 - 245 of VersioningTests [1] are relevant:

        ResourceId qryId = new ResourceId(gmlId);
        rsp = this.wfsClient.GetFeatureVersion(qryId, typeName);
        qryId.setVersion(FES2.VersionAction.LAST.name());

[1] org.opengis.cite.iso19142.versioning.VersioningTests

@rjmartell
Copy link
Contributor

rjmartell commented Oct 17, 2016

There are two steps in this test:

  1. Submit a transaction request to delete a feature instance; the response must report totalDeleted=1 (and the server updates its status--a client cannot do this directly)
  2. Submit a query to retrieve the LAST version in the version chain

The second request is filtering the version chain, the last member of which should be "retired" because the feature was previously deleted. The version chain should end up looking like this in the simplest case:

r1 [FIRST; status: superseded] ---> r2 [LAST; status: retired]

@lgoltz
Copy link
Contributor

lgoltz commented Oct 18, 2016

We totally agree with the test steps. But the point is, that the second request does not contain the VersionAction "LAST" as it is set after the request is submitted. Swapping lines 244 and 245 in https://github.com/opengeospatial/ets-wfs20/blob/1.25/src/main/java/org/opengis/cite/iso19142/versioning/VersioningTests.java should do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants