apache / apache/druid

Improve test coverage of DataSourceOptimizer

Open
#9,257 0 comments 0 reactions 0 assignees View on GitHub
Area - Testing Improvement
Dominant language
Java
Stars
14.1k
Forks
3.8k
Avg merge
2d 58m
Merged PRs (30d)
233

Description

The sole test of `optimize()` doesn't execute all branches of this complex method.

In #7306, I've introduced a [bug](https://github.com/apache/druid/pull/7306/commits/6745f4a74f234d367e763e464f2199d5f89da7bf) in this class which was not caught by tests.

FYI @zhangxinyu1

Contributor guide

Open the contributing guide

Research direction

Locate DataSourceOptimizer and its sole optimize() test, then read the complex method and identify branches the test misses. Add focused coverage for those paths, including the regression described in pull request #7306, and verify the test suite passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.