Repository navigation
Name the test that discharges every abstract test stating a response - #82
Merged
Merged
Conversation
The distance, velocity and acceleration queries of Annex A
(/conf/movingfeatures/tpgeometry-query-*) are response rows of the suite,
discharged by the tests reading what the service answers, and every row
stating a response -- over the fixture database (atsLive) or a scripted
backend (atsResponse) -- names the test asserting it in atsDischargedBy.
TestATSEveryAnsweredRowIsDischarged, which TestATSEveryLiveRowIsDischarged
becomes, holds every such row to a test any test file declares.
Witness. Each of the three query tests states a response ("a Distance query
returns a TReal time-to-distance curve"), and the suite discharged them as
route rows, by the existence of GET /collections/{cid}/items/{fid}/tgsequence/
{tgid}/{qtype} alone: a route answering 404 for every query would have passed
them. The four response rows (collections-get-success,
collection-get-success, tgsequence-get-success, tproperties-get-success) were
counted as "response asserted" by TestATSCoverageReport with nothing naming
the test that asserts them. With the check widened to response rows and the
map unfilled, it fails on exactly those four.
Measured. go test -run TestATS: every test passes; 24 abstract tests state a
response (17 over the fixture, 7 over a scripted backend), 0 undischarged;
the coverage report reads 45 abstract tests, 25 served, 0 not served, 17
needing a backend. Route rows go from 21 to 18, response rows from 4 to 7;
no abstract test leaves the registry.
Why. An abstract test is discharged by what it states. A test stating a
response is met only by a test that reads that response, so the row names
it; whether the answer comes from the fixture or a scripted backend changes
where the test runs, not what a reader of the suite is owed. Acceleration's
row names the test pinning its 501 and its reason, the position the
implementation states on the wiki page of Part 1 until the standard scopes
the query (plan MobilityDB #3805, row A1).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The distance, velocity and acceleration queries of Annex A
(/conf/movingfeatures/tpgeometry-query-*) are response rows of the suite,
discharged by the tests reading what the service answers, and every row
stating a response -- over the fixture database (atsLive) or a scripted
backend (atsResponse) -- names the test asserting it in atsDischargedBy.
TestATSEveryAnsweredRowIsDischarged, which TestATSEveryLiveRowIsDischarged
becomes, holds every such row to a test any test file declares.
Witness. Each of the three query tests states a response ("a Distance query
returns a TReal time-to-distance curve"), and the suite discharged them as
route rows, by the existence of GET /collections/{cid}/items/{fid}/tgsequence/
{tgid}/{qtype} alone: a route answering 404 for every query would have passed
them. The four response rows (collections-get-success,
collection-get-success, tgsequence-get-success, tproperties-get-success) were
counted as "response asserted" by TestATSCoverageReport with nothing naming
the test that asserts them. With the check widened to response rows and the
map unfilled, it fails on exactly those four.
Measured. go test -run TestATS: every test passes; 24 abstract tests state a
response (17 over the fixture, 7 over a scripted backend), 0 undischarged;
the coverage report reads 45 abstract tests, 25 served, 0 not served, 17
needing a backend. Route rows go from 21 to 18, response rows from 4 to 7;
no abstract test leaves the registry.
Why. An abstract test is discharged by what it states. A test stating a
response is met only by a test that reads that response, so the row names
it; whether the answer comes from the fixture or a scripted backend changes
where the test runs, not what a reader of the suite is owed. Acceleration's
row names the test pinning its 501 and its reason, the position the
implementation states on the wiki page of Part 1 until the standard scopes
the query (plan MobilityDB #3805, row A1).