Skip to content

[ISSUE #10475] Add unit tests for CleanupPolicyUtils#10477

Open
quzizii wants to merge 1 commit into
apache:developfrom
quzizii:develop
Open

[ISSUE #10475] Add unit tests for CleanupPolicyUtils#10477
quzizii wants to merge 1 commit into
apache:developfrom
quzizii:develop

Conversation

@quzizii

@quzizii quzizii commented Jun 10, 2026

Copy link
Copy Markdown

Which Issue(s) This PR Fixes

Brief Description

Add unit tests for CleanupPolicyUtils.

The added tests cover cleanup policy resolution from TopicConfig attributes, including:

  • default policy fallback when TopicConfig is absent
  • default policy fallback when attributes are null or empty
  • default policy fallback when cleanup.policy is missing
  • explicit DELETE policy
  • explicit COMPACTION policy
  • invalid cleanup policy value
  • isCompaction() behavior for compaction and non-compaction cases

This PR only adds regression tests and does not change production logic.

How Did You Test This Change?

Run unit tests locally and verified all tests pass successfully.

@oss-sentinel-ai oss-sentinel-ai left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review: Approved ✅

PR: #10477 — Add unit tests for CleanupPolicyUtils
Type: Test coverage (1 file, +145)

Assessment

Comprehensive test coverage for CleanupPolicyUtils covering default policy fallback, null/empty attributes, explicit DELETE/COMPACTION policies, and compaction detection.

Verdict

✅ Well-structured tests. Fixes #10475.


🤖 Automated review by oss-sentinel-ai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] Add regression coverage for CleanupPolicyUtils

2 participants