Skip to content

Commit

Permalink
Fixes for github checks
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitsinha54 committed Dec 25, 2024
1 parent 83b3d0d commit 269c5d5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ public void testBoundedTrieNodeToString() {
public void testEmptyTrie() {
BoundedTrieData trie = new BoundedTrieData();
assertEquals(0, trie.size());
assertTrue(trie.extractResult().result().isEmpty());
assertTrue(trie.extractResult().getResult().isEmpty());
}

@Test
Expand Down Expand Up @@ -879,7 +879,7 @@ public void testClear() {
trie.add(ImmutableList.of("a", "b"));
trie.clear();
assertEquals(0, trie.size());
assertTrue(trie.extractResult().result().isEmpty());
assertTrue(trie.extractResult().getResult().isEmpty());
}

@Test
Expand Down Expand Up @@ -1005,7 +1005,7 @@ public void testAddEmptyPath() {
BoundedTrieData trie = new BoundedTrieData();
trie.add(Collections.emptyList());
assertEquals(1, trie.size());
assertTrue(trie.extractResult().result().contains(ImmutableList.of("false")));
assertTrue(trie.extractResult().getResult().contains(ImmutableList.of("false")));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ private BoundedTrieResult getBoundedTrieValue(MetricUpdate metricUpdate) {
}
BoundedTrie bTrie = (BoundedTrie) metricUpdate.get(BOUNDED_TRIE);
BoundedTrieData trieData = BoundedTrieData.fromProto(bTrie);
return BoundedTrieResult.create(trieData.extractResult().result());
return BoundedTrieResult.create(trieData.extractResult().getResult());
}

private DistributionResult getDistributionValue(MetricUpdate metricUpdate) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ private static MetricResult<BoundedTrieResult> convertBoundedTrieMonitoringInfoT
MetricName.named(labelsMap.get(NAMESPACE_LABEL), labelsMap.get(METRIC_NAME_LABEL)));

BoundedTrieData data = decodeBoundedTrie(monitoringInfo.getPayload());
BoundedTrieResult result = BoundedTrieResult.create(data.extractResult().result());
BoundedTrieResult result = BoundedTrieResult.create(data.extractResult().getResult());
return MetricResult.create(key, false, result);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public void extractsMetrics() throws Exception {
metricQueryResults.getStringSets().iterator().next().getAttempted().getStringSet(),
is(STRING_SET_VALUE));
assertThat(
metricQueryResults.getBoundedTries().iterator().next().getAttempted().result(),
metricQueryResults.getBoundedTries().iterator().next().getAttempted().getResult(),
is(ImmutableSet.of(ImmutableList.of("ab", String.valueOf(false)))));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,16 @@ public static StringSet stringSet(Class<?> namespace, String name) {
}

/**
* Create a metric that accumulates and reports set of unique string values bounded to a max limit
* Create a metric that accumulates and reports set of unique string values bounded to a max
* limit.
*/
public static BoundedTrie boundedTrie(Class<?> namespace, String name) {
return new DelegatingBoundedTrie(MetricName.named(namespace, name));
}

/**
* Create a metric that accumulates and reports set of unique string values bounded to a max limit
* Create a metric that accumulates and reports set of unique string values bounded to a max
* limit.
*/
public static BoundedTrie boundedTrie(String namespace, String name) {
return new DelegatingBoundedTrie(MetricName.named(namespace, name));
Expand Down

0 comments on commit 269c5d5

Please sign in to comment.