Skip to content

Commit dc5661c

Browse files
committed
Address feedback
1 parent 7dde674 commit dc5661c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

sdk/test/metrics/sum_aggregation_test.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,11 @@ TEST(HistogramToSumFilterAttributesWithCardinaityLimit, Double)
194194
{
195195
for (const MetricData &md : smd.metric_data_)
196196
{
197-
// Something weird about attributes hashmap. If cardinality is setup to n, it emits n-1
198-
// including overflow. Just making the logic generic here to succeed for n or n-1 total
199-
// cardinality.
200-
EXPECT_GE(cardinality_limit, md.point_data_attr_.size());
201-
EXPECT_LT(cardinality_limit / 2, md.point_data_attr_.size());
197+
// When the number of unique attribute sets exceeds the cardinality limit, the
198+
// implementation emits up to (cardinality_limit - 1) unique sets and one overflow set,
199+
// resulting in a total of cardinality_limit sets. This test checks that the number of
200+
// emitted attribute sets is within the expected range, accounting for the overflow behavior.
201+
EXPECT_EQ(cardinality_limit, md.point_data_attr_.size());
202202
for (size_t i = 0; i < md.point_data_attr_.size(); i++)
203203
{
204204
EXPECT_EQ(1, md.point_data_attr_[i].attributes.size());

0 commit comments

Comments
 (0)