Skip to content

Commit

Permalink
Relax duration range when validating EH metrics (Azure#42465)
Browse files Browse the repository at this point in the history
* Relax duration range when validating EH metrics
  • Loading branch information
lmolkova authored Oct 18, 2024
1 parent 54aaf55 commit 9240bbd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1676,7 +1676,8 @@ private void assertOperationDuration(TestMeter meter, OperationName operation, S
.collect(Collectors.toList());
assertEquals(1, measurements.size());
if (expectedValue != null) {
assertEquals(expectedValue, measurements.get(0).getValue(), expectedValue);
// sanity check
assertEquals(expectedValue, measurements.get(0).getValue(), expectedValue + 10);
}

assertAllAttributes(HOSTNAME, EVENT_HUB_NAME, partitionId, null, expectedErrorType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,8 @@ private void assertProcessDuration(Duration duration, String partitionId, String
assertEquals(1, durationPerPartition.size());
if (duration != null) {
double sec = getDoubleSeconds(duration);
assertEquals(sec, durationPerPartition.get(0).getValue(), sec);
// sanity check
assertEquals(sec, durationPerPartition.get(0).getValue(), sec + 10);
}

assertAllAttributes(FQDN, ENTITY_NAME, partitionId, CONSUMER_GROUP, expectedErrorType,
Expand Down

0 comments on commit 9240bbd

Please sign in to comment.