Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ee5785f

Browse files
committedJan 4, 2023
Add todo comments
1 parent af57dd3 commit ee5785f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java

+7
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ public CompletableFuture<Optional<LookupResult>> getBrokerServiceUrlAsync(TopicN
180180
if (ExtensibleLoadManagerImpl.isLoadManagerExtensionEnabled(config)) {
181181
return loadManager.get().findBrokerServiceUrl(Optional.of(topic), bundle);
182182
} else {
183+
// TODO: Add unit tests cover it.
183184
return findBrokerServiceUrl(bundle, options);
184185
}
185186
});
@@ -272,6 +273,7 @@ private CompletableFuture<Optional<URL>> internalGetWebServiceUrl(Optional<Servi
272273

273274
return (ExtensibleLoadManagerImpl.isLoadManagerExtensionEnabled(config)
274275
? loadManager.get().findBrokerServiceUrl(topic, bundle) :
276+
// TODO: Add unit tests cover it.
275277
findBrokerServiceUrl(bundle, options)).thenApply(lookupResult -> {
276278
if (lookupResult.isPresent()) {
277279
try {
@@ -1039,6 +1041,7 @@ public CompletableFuture<Boolean> isServiceUnitOwnedAsync(ServiceUnitId suName)
10391041
if (ExtensibleLoadManagerImpl.isLoadManagerExtensionEnabled(config)) {
10401042
return loadManager.get().checkOwnershipAsync(Optional.empty(), suName);
10411043
}
1044+
// TODO: Add unit tests cover it.
10421045
return CompletableFuture.completedFuture(
10431046
ownershipCache.isNamespaceBundleOwned((NamespaceBundle) suName));
10441047
}
@@ -1061,6 +1064,7 @@ public boolean isServiceUnitActive(TopicName topicName) {
10611064
}
10621065

10631066
public CompletableFuture<Boolean> isServiceUnitActiveAsync(TopicName topicName) {
1067+
// TODO: Add unit tests cover it.
10641068
if (ExtensibleLoadManagerImpl.isLoadManagerExtensionEnabled(config)) {
10651069
return getBundleAsync(topicName)
10661070
.thenCompose(bundle -> loadManager.get().checkOwnershipAsync(Optional.of(topicName), bundle));
@@ -1078,6 +1082,7 @@ private boolean isNamespaceOwned(NamespaceName fqnn) throws Exception {
10781082
}
10791083

10801084
private CompletableFuture<Boolean> isNamespaceOwnedAsync(NamespaceName fqnn) {
1085+
// TODO: Add unit tests cover it.
10811086
if (ExtensibleLoadManagerImpl.isLoadManagerExtensionEnabled(config)) {
10821087
return getFullBundleAsync(fqnn)
10831088
.thenCompose(bundle -> loadManager.get().checkOwnershipAsync(Optional.empty(), bundle));
@@ -1087,6 +1092,7 @@ private CompletableFuture<Boolean> isNamespaceOwnedAsync(NamespaceName fqnn) {
10871092
}
10881093

10891094
private CompletableFuture<Boolean> isTopicOwnedAsync(TopicName topic) {
1095+
// TODO: Add unit tests cover it.
10901096
if (ExtensibleLoadManagerImpl.isLoadManagerExtensionEnabled(config)) {
10911097
return getBundleAsync(topic)
10921098
.thenCompose(bundle -> loadManager.get().checkOwnershipAsync(Optional.of(topic), bundle));
@@ -1095,6 +1101,7 @@ private CompletableFuture<Boolean> isTopicOwnedAsync(TopicName topic) {
10951101
}
10961102

10971103
public CompletableFuture<Boolean> checkTopicOwnership(TopicName topicName) {
1104+
// TODO: Add unit tests cover it.
10981105
if (ExtensibleLoadManagerImpl.isLoadManagerExtensionEnabled(config)) {
10991106
return getBundleAsync(topicName)
11001107
.thenCompose(bundle -> loadManager.get().checkOwnershipAsync(Optional.of(topicName), bundle));

0 commit comments

Comments
 (0)
Please sign in to comment.