Demogorgon314 commented on code in PR #19773:
URL: https://github.com/apache/pulsar/pull/19773#discussion_r1136487195
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/extensions/channel/ServiceUnitStateChannelTest.java:
##########
@@ -553,11 +552,24 @@ public void splitAndRetryTest() throws Exception {
}
// Call the real method
reset(namespaceService);
+ doReturn(CompletableFuture.completedFuture(List.of("test-topic-1",
"test-topic-2")))
+
.when(namespaceService).getOwnedTopicListForNamespaceBundle(any());
return future;
}).when(namespaceService).updateNamespaceBundles(any(), any());
doReturn(namespaceService).when(pulsar1).getNamespaceService();
-
- Split split = new Split(bundle, ownerAddr1.get(), new HashMap<>());
Review Comment:
Updated.
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/channel/ServiceUnitStateData.java:
##########
@@ -36,16 +39,22 @@ public record ServiceUnitStateData(
}
}
+ public ServiceUnitStateData(ServiceUnitState state, String dstBroker,
String sourceBroker,
+ Map<String, Optional<String>>
splitServiceUnitToDestBroker, long versionId) {
+ this(state, dstBroker, sourceBroker, splitServiceUnitToDestBroker,
false,
+ System.currentTimeMillis(), versionId);
+ }
+
public ServiceUnitStateData(ServiceUnitState state, String dstBroker,
String sourceBroker, long versionId) {
- this(state, dstBroker, sourceBroker, false,
System.currentTimeMillis(), versionId);
+ this(state, dstBroker, sourceBroker, Map.of(), false,
System.currentTimeMillis(), versionId);
Review Comment:
Updated.
--
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]