dlmarion commented on code in PR #92:
URL: https://github.com/apache/accumulo-access/pull/92#discussion_r2632809422
##########
core/src/test/java/org/apache/accumulo/access/tests/AccessExpressionTest.java:
##########
@@ -170,10 +168,14 @@ public void testSpecificationDocumentation() throws
IOException, URISyntaxExcept
specLinesFromAbnfFile =
bufferedReader.lines().dropWhile(beforeFirstLine).collect(toList());
}
- // grab from the markdown, but make sure to skip the markdown triple ticks
- List<String> specLinesFromMarkdownFile =
Files.readAllLines(Path.of("SPECIFICATION.md"))
- .stream().dropWhile(line -> !line.startsWith("```ABNF")).skip(1)
- .takeWhile(line -> !line.startsWith("```")).collect(toList());
+ List<String> specLinesFromMarkdownFile;
+ try (var specFile =
AccessExpression.class.getResourceAsStream("/SPECIFICATION.md");
Review Comment:
First, I wasn't sure how the test was finding SPECIFICATION.md. When I
refactored the test into it's new module, this failed. There are several
modules that require testdata.json, so I have the maven-resources-plugin
copying that file into each modules `target/test-classes` directory. I added
SPECIFICATION.md to that configuration so now this code works.
--
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]