Skip to content

[fix][test] Fix flaky test: PrometheusMetricsTest.testDuplicateMetricTypeDefinitions - #18077

Merged
nicoloboschi merged 2 commits into
apache:masterfrom
nicoloboschi:fix-metrics-trans
Oct 18, 2022
Merged

nicoloboschi merged 2 commits into
apache:masterfrom
nicoloboschi:fix-metrics-trans

Conversation

@nicoloboschi

Copy link
Copy Markdown
Contributor

Motivation

Fix #17921
The test may fails if a previous test in the same fork started the transactions and therefore the transactions metrics are published. In the PulsarService shutdown hooks the metrics are never unregistered.

Modifications

  • Unregister transactions metrics in the PulsarService shutdown

Verifying this change

  • Make sure that the change passes the CI checks.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@codecov-commenter

codecov-commenter commented Oct 18, 2022 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 9 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (master@92b4708). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...nator/impl/MLTransactionMetadataStoreProvider.java 0.00% 9 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #18077   +/-   ##
=========================================
  Coverage          ?   45.97%           
  Complexity        ?    17638           
=========================================
  Files             ?     1574           
  Lines             ?   128336           
  Branches          ?    14118           
=========================================
  Hits              ?    59007           
  Misses            ?    63218           
  Partials          ?     6111           
Flag Coverage Δ
unittests 45.97% <50.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...n/java/org/apache/pulsar/broker/PulsarService.java 57.30% <100.00%> (ø)
...ion/pendingack/impl/MLPendingAckStoreProvider.java 70.00% <100.00%> (ø)
...nator/impl/MLTransactionMetadataStoreProvider.java 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lhotari lhotari left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nicoloboschi
nicoloboschi merged commit eed8c74 into apache:master Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/broker doc-not-needed Your PR changes do not impact docs ready-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky-test: PrometheusMetricsTest.testDuplicateMetricTypeDefinitions

4 participants