Skip to content

Commit

Permalink
Fix leak in NamespaceStatsAggregatorTest
Browse files Browse the repository at this point in the history
  • Loading branch information
lhotari committed Feb 13, 2025
1 parent fe0bf96 commit e29941f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import lombok.Cleanup;
import org.apache.bookkeeper.mledger.ManagedLedger;
import org.apache.bookkeeper.mledger.impl.ManagedLedgerMBeanImpl;
import org.apache.bookkeeper.mledger.util.StatsBuckets;
Expand Down Expand Up @@ -103,6 +104,7 @@ public void testGenerateSubscriptionsStats() {
PersistentTopicMetrics persistentTopicMetrics = new PersistentTopicMetrics();
when(topic.getPersistentTopicMetrics()).thenReturn(persistentTopicMetrics);
topicsMap.put("my-topic", topic);
@Cleanup("releaseAll")
PrometheusMetricStreams metricStreams = Mockito.spy(new PrometheusMetricStreams());

// Populate subscriptions stats
Expand Down

0 comments on commit e29941f

Please sign in to comment.