Skip to content

Conversation

@mjsax
Copy link
Member

@mjsax mjsax commented Aug 28, 2025

Adds metrics description verification to RLMQuotaMetricsTest.

Reviewers: Ken Huang s7133700@gmail.com, TengYao Chi
kitingiao@gmail.com, Chia-Ping Tsai chia7712@gmail.com

@github-actions github-actions bot added tests Test fixes (including flaky tests) storage Pull requests that target the storage module tiered-storage Related to the Tiered Storage feature small Small PRs labels Aug 28, 2025
Copy link
Contributor

@frankvicky frankvicky left a comment

Choose a reason for hiding this comment

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

Looks like a typo 😄

Copy link
Collaborator

@m1a2st m1a2st left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

// Register the sensor
quotaMetrics.sensor();
var avg = metrics.metricName("metric" + "-avg", "group", String.format("format", "average"));
var avg = metrics.metricName("metric" + "-avg", "group", "average");
Copy link
Member

Choose a reason for hiding this comment

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

I guess it was intended to test the description format. Perhaps we could add such a test. for example:

        RLMQuotaMetrics quotaMetrics = new RLMQuotaMetrics(metrics, "metric", "group", "this is %s", 5);

        // Register the sensor
        quotaMetrics.sensor();
        var avg = metrics.metricName("metric" + "-avg", "group", "this is average");

        // Verify that metrics are created
        var result = metrics.metric(avg);
        assertNotNull(result);
        assertEquals(result.metricName().description(), avg.description());

@mjsax mjsax changed the title MINOR: cleanup String.format MINOR: improve RLMQuotaMetricsTest Aug 28, 2025
@chia7712 chia7712 merged commit c7154b8 into apache:trunk Aug 29, 2025
25 checks passed
@mjsax mjsax deleted the minor-cleanup-format branch August 29, 2025 18:40
eduwercamacaro pushed a commit to littlehorse-enterprises/kafka that referenced this pull request Nov 12, 2025
Adds metrics description verification to RLMQuotaMetricsTest.

Reviewers: Ken Huang <s7133700@gmail.com>, TengYao Chi
<kitingiao@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

small Small PRs storage Pull requests that target the storage module tests Test fixes (including flaky tests) tiered-storage Related to the Tiered Storage feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants