Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Umbrella] Improve Test Code Coverage for Ignored Classes #641

Open
1 of 2 tasks
wuchong opened this issue Mar 20, 2025 · 6 comments
Open
1 of 2 tasks

[Umbrella] Improve Test Code Coverage for Ignored Classes #641

wuchong opened this issue Mar 20, 2025 · 6 comments
Labels

Comments

@wuchong
Copy link
Member

wuchong commented Mar 20, 2025

Search before asking

  • I searched in the issues and found nothing similar.

Description

Our current test code coverage is below the desired threshold, leaving parts of the codebase untested and potentially prone to bugs or regressions. Increasing test coverage is critical to ensuring the reliability, maintainability, and long-term stability of our application.

We have temporarily ignored a lot of classes in the test-coverage: https://github.com/alibaba/fluss/blob/main/fluss-test-coverage/pom.xml#L247

We need to improve the code coverage by adding unit tests and integration tests around the classes, and remove them from the list.

Willingness to contribute

  • I'm willing to submit a PR!
@wuchong wuchong changed the title [Umberalla] Improve Test Code Coverage for Ignored Classes [Umbrella] Improve Test Code Coverage for Ignored Classes Mar 20, 2025
@wuchong
Copy link
Member Author

wuchong commented Mar 20, 2025

The failed coverage for flink connector:

Warning:  Rule violated for class com.alibaba.fluss.flink.source.split.SnapshotSplit: lines covered ratio is 0.66, but expected minimum is 0.70
Warning:  Rule violated for class com.alibaba.fluss.flink.source.enumerator.initializer.NoStoppingOffsetsInitializer: lines covered ratio is 0.50, but expected minimum is 0.70
Warning:  Rule violated for class com.alibaba.fluss.flink.utils.CatalogExceptionUtils: lines covered ratio is 0.66, but expected minimum is 0.70
Warning:  Rule violated for class com.alibaba.fluss.flink.utils.DataLakeUtils: lines covered ratio is 0.45, but expected minimum is 0.70
Warning:  Rule violated for class com.alibaba.fluss.flink.metrics.FlinkHistogram.FlinkHistogramStatistics: lines covered ratio is 0.00, but expected minimum is 0.70
Warning:  Rule violated for class com.alibaba.fluss.flink.metrics.FlinkCounter: lines covered ratio is 0.00, but expected minimum is 0.70
Warning:  Rule violated for class com.alibaba.fluss.flink.metrics.FlinkMeter: lines covered ratio is 0.33, but expected minimum is 0.70
Warning:  Rule violated for class com.alibaba.fluss.flink.metrics.FlinkHistogram: lines covered ratio is 0.50, but expected minimum is 0.70
Warning:  Rule violated for class com.alibaba.fluss.flink.source.event.PartitionBucketsUnsubscribedEvent: lines covered ratio is 0.66, but expected minimum is 0.70
Warning:  Rule violated for class com.alibaba.fluss.flink.catalog.FlinkCatalog: lines covered ratio is 0.63, but expected minimum is 0.70
Warning:  Rule violated for class com.alibaba.fluss.flink.catalog.FlinkCatalogOptions: lines covered ratio is 0.66, but expected minimum is 0.70
Warning:  Rule violated for class com.alibaba.fluss.flink.source.reader.RecordAndPos: lines covered ratio is 0.47, but expected minimum is 0.70

https://github.com/alibaba/fluss/actions/runs/13965170459/job/39093809265

@wuchong wuchong added the good first issue Good for newcomers label Mar 20, 2025
@gkatzioura
Copy link

I am putting a pr on this

@MehulBatra
Copy link
Contributor

MehulBatra commented Mar 21, 2025

@gkatzioura Could you please Highlight which class you are targetting, I have already started working on com.alibaba.fluss.flink.catalog.FlinkCatalog & FlinkCatalogOptions
it would be great if we could create sub-issues and target one after the other, open for your thoughts!

@MehulBatra
Copy link
Contributor

MehulBatra commented Mar 21, 2025

Link: #645 (comment)

@gkatzioura
Copy link

@MehulBatra
The metric ones

Warning:  Rule violated for class com.alibaba.fluss.flink.metrics.FlinkHistogram.FlinkHistogramStatistics: lines covered ratio is 0.00, but expected minimum is 0.70
Warning:  Rule violated for class com.alibaba.fluss.flink.metrics.FlinkCounter: lines covered ratio is 0.00, but expected minimum is 0.70
Warning:  Rule violated for class com.alibaba.fluss.flink.metrics.FlinkMeter: lines covered ratio is 0.33, but expected minimum is 0.70
Warning:  Rule violated for class com.alibaba.fluss.flink.metrics.FlinkHistogram: lines covered ratio is 0.50, but expected minimum is 0.70
Warning:  Rule violated for class com.alibaba.fluss.flink.source.event.PartitionBucketsUnsubscribedEvent: lines covered ratio is 0.66, but expected minimum is 0.70

@MehulBatra
Copy link
Contributor

Amazing, Please feel free to create a subissue for the same, and link them with this.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants