File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
clients/src/test/java/org/apache/kafka/common/protocol Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 19
19
import org .junit .jupiter .api .Test ;
20
20
21
21
import static org .junit .jupiter .api .Assertions .assertFalse ;
22
+ import static org .junit .jupiter .api .Assertions .assertTrue ;
22
23
23
24
public class ProtocolTest {
24
25
@@ -27,6 +28,18 @@ public void testToHtml() {
27
28
var html = Protocol .toHtml ();
28
29
assertFalse (html .isBlank ());
29
30
assertFalse (html .contains ("LeaderAndIsr" ), "Removed LeaderAndIsr should not show in HTML" );
31
+
32
+ String requestVersion ;
33
+ String responseVersion ;
34
+ for (ApiKeys key : ApiKeys .clientApis ()) {
35
+ for (short version = key .oldestVersion (); version <= key .latestVersion (); version ++) {
36
+ requestVersion = key .name + " Request (Version: " + version ;
37
+ responseVersion = key .name + " Response (Version: " + version ;
38
+
39
+ assertTrue (html .contains (requestVersion ), "Missing request header for " + key .name + " version:" + version );
40
+ assertTrue (html .contains (responseVersion ), "Missing response header for " + key .name + " version:" + version );
41
+ }
42
+ }
30
43
}
31
44
32
45
}
You can’t perform that action at this time.
0 commit comments