github-advanced-security[bot] commented on code in PR #19140:
URL: https://github.com/apache/druid/pull/19140#discussion_r2922149826
##########
server/src/test/java/org/apache/druid/server/http/CoordinatorDynamicConfigSyncerTest.java:
##########
@@ -103,4 +103,30 @@
.jsonContent(DefaultObjectMapper.INSTANCE, config);
verify(serviceClient).asyncRequest(eq(requestBuilder),
ArgumentMatchers.any());
}
+
+ @Test
+ public void testSync_whenDruidNode_isNull()
+ {
+ CoordinatorDynamicConfig config = CoordinatorDynamicConfig
+ .builder()
+ .withMaxSegmentsToMove(105)
+ .withReplicantLifetime(500)
+ .withReplicationThrottleLimit(5)
+ .build();
+
+ doReturn(config).when(coordinatorConfigManager).getCurrentDynamicConfig();
+ List<DiscoveryDruidNode> nodes = List.of(
+ new DiscoveryDruidNode(
+ null,
+ NodeRole.BROKER,
+ null,
+ null
+ )
+ );
+ doReturn(nodes).when(druidNodeDiscovery).getAllNodes();
+
+ target.broadcastConfigToBrokers();
+ RequestBuilder requestBuilder = new RequestBuilder(HttpMethod.POST,
"/druid-internal/v1/config/coordinator")
+ .jsonContent(DefaultObjectMapper.INSTANCE, config);
Review Comment:
## Unread local variable
Variable 'RequestBuilder requestBuilder' is never read.
[Show more
details](https://github.com/apache/druid/security/code-scanning/10883)
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]