test: Refactor telemetry tests to follow repository style guidelines - #345
test: Refactor telemetry tests to follow repository style guidelines#345suni72 wants to merge 5 commits into
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on refactoring the telemetry test suite to improve readability and consistency. By updating test method names and adjusting visibility modifiers, the codebase now better adheres to standard Java testing practices while maintaining the existing functional logic. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request standardizes test method names across several telemetry test classes by removing the redundant 'test' prefix and updating visibility modifiers to package-private. The review feedback identifies redundant tests in LoggingTelemetryReporterTest that duplicate LoggingTelemetryOptionsTest, and recommends correcting camelCase typos ('fallsback' to 'fallsBack') in two method names.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #345 +/- ##
=========================================
Coverage 98.14% 98.14%
Complexity 564 564
=========================================
Files 38 38
Lines 1779 1779
Branches 167 167
=========================================
Hits 1746 1746
Misses 15 15
Partials 18 18 🚀 New features to boost your workflow:
|
|
|
||
| @Test | ||
| void testOpenTelemetryOptionsLoggingProvider() { | ||
| void openTelemetryOptionsLoggingProvider() { |
There was a problem hiding this comment.
Can you also update these names as per following convention:
methodName_stateUnderTest_expectedBehavior.
There was a problem hiding this comment.
Can you update the names here and above as well.
dheerajsngh
left a comment
There was a problem hiding this comment.
Update the PR description to also include "style".
Also update hte PR title to include style or test.
| } | ||
|
|
||
| @Test | ||
| public void testLoggingOptionsCustomValues() { |
There was a problem hiding this comment.
I don't this tests is present. We can add this back.
There was a problem hiding this comment.
LoggingTelemetryOptions is an AutoValue class so generally we don't need to test the builder. Also testCreateFromOptions_WithAllOptions in LoggingTelemetryOptionsTest.java checks that custom values from options are set correctly.
dheerajsngh
left a comment
There was a problem hiding this comment.
Please update the PR title to include its a style or test change.
test: Refact ....
Other thing looks good.
Type of Change
feat: A new featurefix: A bug fixdocs: Documentation only changesstyle: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)refactor: A code change that neither fixes a bug nor adds a featureperf: A code change that improves performancetest: Adding missing tests or correcting existing testschore: Changes to the build process or auxiliary tools and libraries such as documentation generationDescription
What?
testLoggingOptionsDefaultValuesandtestLoggingOptionsCustomValueswere similar tologgingTelemetryOptionsDefaultValues)Checklist
feat(core): ...)Generated/Assisted by Agent? [Yes/No]