davsclaus commented on code in PR #26758:
URL: https://github.com/apache/camel/pull/26758#discussion_r4081056139
##########
dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/test/java/org/apache/camel/dsl/yaml/validator/EipDocExamplesTest.java:
##########
@@ -141,6 +141,9 @@ private static DocExamples validate(List<String> pages)
throws Exception {
if (skipped != null && yaml.contains(skipped)) {
continue;
}
+ if (DocBlocks.markedToSkip(doc, m.start())) {
Review Comment:
Fair - I argued the tests needed their own loop to report *which* example
failed, and that was wrong: `DocBlocks.examples()` returns the route examples
in order, so the index in that list is the number the message wants.
Both tests now read their blocks with `DocBlocks.examples(doc)` and their
`YAML_BLOCK` patterns are gone. They gain the callout stripping, and one place
is left that knows what a YAML route example is and which blocks are marked to
be left out.
One behaviour note: a marked block is no longer counted, so a page that has
one shifts the numbering of the examples after it by one. Only to-eip has a
marked block today.
##########
dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ai/CatalogDocExamplesTest.java:
##########
@@ -106,6 +107,10 @@ private static DocExamples validate(List<String> pages) {
if (skipped != null && yaml.contains(skipped)) {
continue;
}
+ if (DocBlocks.markedToSkip(doc, m.start())) {
Review Comment:
Done in the same change: `CatalogDocExamplesTest` reads
`DocBlocks.examples(doc)` as well, and its own pattern is gone. Verified
against the catalog after a rebuild - 2 tests green.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]