-
Notifications
You must be signed in to change notification settings - Fork 520
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
Kushagra/issue#2970 #2988
Kushagra/issue#2970 #2988
Conversation
GoTimeUtilTest is refactored to not directly call Optional.get().
Update GoTimeUtilTest.java
…#2970 Revert "Update GoTimeUtilTest.java"
GoTimeUtilTest is refactored to not directly call Optional.get().
Eclipse JKube CI ReportStarted new GH workflow run for #2988 (2024-04-30T07:03:15Z) ⚙️ JKube E2E Tests (8877416057)
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2988 +/- ##
=============================================
+ Coverage 59.36% 70.72% +11.36%
- Complexity 4586 5071 +485
=============================================
Files 500 489 -11
Lines 21211 19572 -1639
Branches 2830 2526 -304
=============================================
+ Hits 12591 13842 +1251
+ Misses 7370 4501 -2869
+ Partials 1250 1229 -21 ☔ View full report in Codecov by Sentry. |
@manusa @sunix @rohanKanojia This commit is conflict free, please proceed with the review to merge it. |
int result = GoTimeUtil.durationSeconds(duration).get(); | ||
assertThat(result).isEqualTo(expectedDuration); | ||
Optional<Integer> optionalResult = GoTimeUtil.durationSeconds(duration); | ||
assertThat(optionalResult) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please move the method call inline?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. You can move ahead with the review.
inlined the method calls in conversion function
@@ -21,6 +21,7 @@ | |||
import org.junit.jupiter.params.provider.ValueSource; | |||
|
|||
import java.util.stream.Stream; | |||
import java.util.Optional; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this import still used?
removed the unused imports.
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thx!
@sunix please review the changes. |
Description
Refactored GoTimeUtilTest to avoid directly calling Optional.get(). Now, the test checks whether the Optional contains a value before fetching it.
Fixes #2970
Type of change
test, version modification, documentation, etc.)
Checklist
git config user.name "Kushagra Sinha"
git config user.email "kushagrasinha123ks@gmail.com"
git commit --amend --signoff
git push origin kushagra/issue#2970 -f