Skip to content

[Tests] Fix Prometheus metrics parsing for "+Inf" in PrometheusMetricsTest and Pulsar Function tests - #10193

Merged
merlimat merged 1 commit into
apache:masterfrom
lhotari:lh-fix-prometheus-metric-parsing-in-tests
Apr 13, 2021
Merged

[Tests] Fix Prometheus metrics parsing for "+Inf" in PrometheusMetricsTest and Pulsar Function tests#10193
merlimat merged 1 commit into
apache:masterfrom
lhotari:lh-fix-prometheus-metric-parsing-in-tests

Conversation

@lhotari

@lhotari lhotari commented Apr 12, 2021

Copy link
Copy Markdown
Member

Motivation

PrometheusMetricsTest has been flaky with this type of error mesage:
java.lang.AssertionError: line pulsar_broker_publish_latency{cluster="test",quantile="0.0"} +Inf does not match pattern ^(\w+)\{([^\}]+)\}\s(-?[\d\w\.-]+)(\s(\d+))?$ expected [true] but found [false]
The problem is that the metrics parsing hasn't properly handled +Inf which is used as a value when there are no metrics.

Modifications

Fix the regex pattern to handle +Inf and add tests.

@lhotari

lhotari commented Apr 13, 2021

Copy link
Copy Markdown
Member Author

/pulsarbot run-failure-checks

@merlimat
merlimat merged commit 187fb97 into apache:master Apr 13, 2021
eolivelli pushed a commit to datastax/pulsar that referenced this pull request May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants