Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-5244

Tests which delete singleton metrics break subsequent metrics tests

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.11.0.0
    • core
    • None

    Description

      Static metrics like BrokerTopicStats.ReplicationBytesInPerSec are created in a singleton, resulting in one metric being created in a JVM. Some tests like MetricsDuringTopicCreationDeletionTest delete all metrics from the static metrics registry. The singleton metrics don't get recreated and subsequent tests relying on these metrics may fail.

      Singleton metrics make testing hard - we have no idea what metrics are being tested. Not sure we want to change that though since there is a lot of code that relies on this. But we have to fix tests to ensure that metrics are left in a good state.

      Attachments

        Issue Links

          Activity

            People

              rsivaram Rajini Sivaram
              rsivaram Rajini Sivaram
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: