Skip to content

Commit 8a5c2f8

Browse files
authored
fix(testing): Handles Apdex metrics count correctly (#957)
The existing code did not handle an Apdex metric correctly if a count of "1" was specified. It only worked if no count was specified. This change allows either form to work.
1 parent 819a76d commit 8a5c2f8

File tree

1 file changed

+1
-1
lines changed
  • daemon/internal/newrelic/integration

1 file changed

+1
-1
lines changed

daemon/internal/newrelic/integration/test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ func (t *Test) compareMetricsExist(harvest *newrelic.Harvest) {
549549
// actually the "satisfied" count, not a total count of metric
550550
// as it is for other types of metrics
551551
apdex_metric := strings.HasPrefix(expected, "Apdex/")
552-
if (count == -1 && (apdex_metric || actualCount > 0)) || (actualCount == count) {
552+
if (apdex_metric || (count == -1 && actualCount > 0)) || (actualCount == count) {
553553
metricPasses = true
554554
}
555555

0 commit comments

Comments
 (0)