Skip to content

Commit

Permalink
Add todo comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Demogorgon314 committed Jan 4, 2023
1 parent af57dd3 commit ee5785f
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ public CompletableFuture<Optional<LookupResult>> getBrokerServiceUrlAsync(TopicN
if (ExtensibleLoadManagerImpl.isLoadManagerExtensionEnabled(config)) {
return loadManager.get().findBrokerServiceUrl(Optional.of(topic), bundle);
} else {
// TODO: Add unit tests cover it.
return findBrokerServiceUrl(bundle, options);
}
});
Expand Down Expand Up @@ -272,6 +273,7 @@ private CompletableFuture<Optional<URL>> internalGetWebServiceUrl(Optional<Servi

return (ExtensibleLoadManagerImpl.isLoadManagerExtensionEnabled(config)
? loadManager.get().findBrokerServiceUrl(topic, bundle) :
// TODO: Add unit tests cover it.
findBrokerServiceUrl(bundle, options)).thenApply(lookupResult -> {
if (lookupResult.isPresent()) {
try {
Expand Down Expand Up @@ -1039,6 +1041,7 @@ public CompletableFuture<Boolean> isServiceUnitOwnedAsync(ServiceUnitId suName)
if (ExtensibleLoadManagerImpl.isLoadManagerExtensionEnabled(config)) {
return loadManager.get().checkOwnershipAsync(Optional.empty(), suName);
}
// TODO: Add unit tests cover it.
return CompletableFuture.completedFuture(
ownershipCache.isNamespaceBundleOwned((NamespaceBundle) suName));
}
Expand All @@ -1061,6 +1064,7 @@ public boolean isServiceUnitActive(TopicName topicName) {
}

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

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

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

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

0 comments on commit ee5785f

Please sign in to comment.