C0urante commented on code in PR #11779:
URL: https://github.com/apache/kafka/pull/11779#discussion_r891379394
##########
connect/runtime/src/main/java/org/apache/kafka/connect/storage/ClusterConfigState.java:
##########
@@ -280,4 +326,4 @@ public int hashCode() {
inconsistentConnectors,
configTransformer);
}
-}
+}
Review Comment:
🤦
##########
connect/runtime/src/main/java/org/apache/kafka/connect/storage/ClusterConfigState.java:
##########
@@ -280,4 +326,4 @@ public int hashCode() {
inconsistentConnectors,
configTransformer);
}
-}
+}
Review Comment:
🤦 sorry, done.
##########
connect/basic-auth-extension/src/test/java/org/apache/kafka/connect/rest/basic/auth/extension/JaasBasicAuthFilterTest.java:
##########
@@ -139,14 +140,23 @@ public void testNoFileOption() throws IOException {
jaasBasicAuthFilter.filter(requestContext);
verify(requestContext).abortWith(any(Response.class));
- verify(requestContext).getMethod();
+ verify(requestContext, atLeastOnce()).getMethod();
verify(requestContext).getHeaderString(JaasBasicAuthFilter.AUTHORIZATION);
}
@Test
- public void testPostWithoutAppropriateCredential() throws IOException {
+ public void testInternalTaskConfigEndpointSkipped() throws IOException {
+ testInternalEndpointSkipped("connectors/connName/tasks");
+ }
+
+ @Test
+ public void testInternalZombieFencingEndpointSkipped() throws IOException {
+ testInternalEndpointSkipped("connectors/connName/fence");
+ }
+
+ private void testInternalEndpointSkipped(String endpoint) throws
IOException {
UriInfo uriInfo = mock(UriInfo.class);
- when(uriInfo.getPath()).thenReturn("connectors/connName/tasks");
+ when(uriInfo.getPath()).thenReturn(endpoint);
ContainerRequestContext requestContext =
mock(ContainerRequestContext.class);
when(requestContext.getMethod()).thenReturn(HttpMethod.POST);
Review Comment:
😱 this test was broken and did not catch calls to
`ContainerRequestContext::abort`. I've updated the test to catch those calls
and, after it started failing, also updated it to use the correct HTTP method.
Good catch, thanks!
--
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]