Skip to content

Quads tests for consumer#61

Merged
Ostrzyciel merged 2 commits intomainfrom
test-cases-consumer-5
Apr 30, 2025
Merged

Quads tests for consumer#61
Ostrzyciel merged 2 commits intomainfrom
test-cases-consumer-5

Conversation

@adanilenka
Copy link
Collaborator

Relates to #39

Implements test cases for the QUADS 1.1 for consumer:

  • conformance to RDF 1.1 expectations from the graph node (BN, IRI, default graph)
  • repeated term usage in every term possible, including multiframe streams
  • lookup tables reuse across frames
  • checks for invalid rows in the stream

@adanilenka adanilenka requested a review from Ostrzyciel April 30, 2025 12:17
- `pos_005` - multiple frames (3), repeated terms across frames. Prefix table enabled.

-`neg_001` - single frame, a "triple" row is in the stream.
-`neg_002` - single frame, a "graph_start" row is in the stream.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add a test case for graph_end like this one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, now it is neg_003


-`neg_001` - single frame, a "triple" row is in the stream.
-`neg_002` - single frame, a "graph_start" row is in the stream.
-`neg_003` - single frame, graph label is a literal when generalized_statements=false.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused, which part of the spec does this check?

Copy link
Collaborator Author

@adanilenka adanilenka Apr 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the:

PHYSICAL_STREAM_TYPE_QUADS (2) – stream of RDF quad statements (same as simple statements in N-Quads). In this case, the stream MUST NOT contain RdfStreamRow messages with the triple, graph_start, or graph_end fields set.

and

generalized_statements (3) – whether the stream contains generalized RDF triples or graphs. This field MUST be set to true if the stream contains generalized RDF triples or graphs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, neg_001 and 002 are clear, but 003 – ?

Again, I'm not sure if this is the responsibility of the consumer to validate this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we follow the logic of the producer, then this test just moves to the rdf_generalized folders and becomes a positive one (option is set and the data has generalized statements), and we do not check for violations of this logic in other scenarios
is it okay?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup! I don't really see any other sensible way to test this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, thanks for clarification :) I added a graph_end test instead of the one with generalized statements, pls take a look

@Ostrzyciel Ostrzyciel merged commit 25f2198 into main Apr 30, 2025
10 checks passed
@Ostrzyciel Ostrzyciel deleted the test-cases-consumer-5 branch April 30, 2025 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants