Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nastassia-dailidava committed Sep 10, 2024
1 parent 51c3967 commit 2b6750d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,15 @@ public DeltaWatch createDeltaWatch(
String version) {
long watchId = watchCount.incrementAndGet();
status.setWatch(watchId, watch);
watch.setStop(() -> status.removeWatch(watchId));
watch.setStop(() -> {
LOGGER.debug("removing watch {}", watchId);
status.removeWatch(watchId);
});

if (LOGGER.isDebugEnabled()) {
LOGGER.debug("open watch {} for {}[{}] from node {} for version {}",
LOGGER.debug("open watch {} for {} from node {} for version {}",
watchId,
url,
String.join(", ", resources),
group,
version);
}
Expand Down Expand Up @@ -371,12 +374,6 @@ protected void respondWithSpecificOrder(T group,
String version = snapshot.version(watch.request().getResourceType(), watch.request().getResourceNamesList());

if (!watch.request().getVersionInfo().equals(version)) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("responding to open watch {}[{}] with new version {}",
id,
String.join(", ", watch.request().getResourceNamesList()),
version);
}

respond(watch, snapshot, group);

Expand Down Expand Up @@ -413,12 +410,6 @@ protected void respondWithSpecificOrder(T group,
String version = snapshot.version(watch.request().getResourceType(), Collections.emptyList());

if (!watch.version().equals(version)) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("responding to open watch {}[{}] with new version {}",
id,
String.join(", ", watch.trackedResources().keySet()),
version);
}

List<String> removedResources = snapshotRemovedResources.stream()
.filter(s -> watch.trackedResources().get(s) != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ public void invalidNamesListShouldReturnWatcherWithNoResponseInAdsMode() {
false,
false
);

assertThatWatchIsOpenWithNoResponses(new WatchAndTracker(watch, responseTracker));
}

Expand Down

0 comments on commit 2b6750d

Please sign in to comment.