alanlau28 commented on code in PR #23511:
URL: https://github.com/apache/kafka/pull/23511#discussion_r4062736872
##########
generator/src/test/java/org/apache/kafka/message/MessageGeneratorTest.java:
##########
@@ -189,60 +191,90 @@ public void testHeaderVersionExplicitSingleRange() throws
Exception {
}
@Test
- public void testHeaderVersionFallbackFlexibleDerived() throws Exception {
+ public void testHeaderVersionMapIsTheOnlySource() throws Exception {
+ // A map that disagrees with the flexibleVersions-derived rule is
emitted verbatim: there is no
+ // fallback that could second-guess it. (Parse-time checks against the
header schemas run in
+ // processDirectories, not here.)
String source = generateApiMessageTypeSource(
- spec(3, "request", "QuxRequest", "0-5", "2+", null),
- spec(3, "response", "QuxResponse", "0-5", "2+", null));
- assertTrue(source.contains(
- "case 3: // Qux\n" +
- "if (_version >= 2) {\n" +
- "return (short) 2;\n" +
- "} else {\n" +
- "return (short) 1;\n" +
- "}\n"), source);
+ spec(3, "request", "QuxRequest", "0-5", "2+", "{'0+': '1'}"),
Review Comment:
removed the test :)
--
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]