Update XenServer610WrapperTest.java#8139
Merged
yadvr merged 2 commits intoapache:mainfrom Nov 3, 2023
Merged
Conversation
13 tasks
Codecov Report
@@ Coverage Diff @@
## main #8139 +/- ##
============================================
+ Coverage 28.15% 29.51% +1.35%
- Complexity 29181 31005 +1824
============================================
Files 5111 5127 +16
Lines 360669 364530 +3861
Branches 52700 54349 +1649
============================================
+ Hits 101562 107585 +6023
+ Misses 245113 242064 -3049
- Partials 13994 14881 +887
Flags with carried forward coverage won't be shown. Click here to find out more. see 309 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
yadvr
reviewed
Oct 25, 2023
...st/java/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/XenServer610WrapperTest.java
Outdated
Show resolved
Hide resolved
yadvr
reviewed
Oct 25, 2023
...st/java/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/XenServer610WrapperTest.java
Show resolved
Hide resolved
DaanHoogland
approved these changes
Oct 25, 2023
Contributor
DaanHoogland
left a comment
There was a problem hiding this comment.
agree with @rohityadavcloud 's comments. otherwise ltgm
Co-authored-by: Rohit Yadav <rohityadav89@gmail.com>
Contributor
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7513 |
yadvr
approved these changes
Nov 3, 2023
dhslove
pushed a commit
to ablecloud-team/ablestack-cloud
that referenced
this pull request
Nov 8, 2023
* Update XenServer610WrapperTest.java * Apply suggestions from code review Co-authored-by: Rohit Yadav <rohityadav89@gmail.com> --------- Co-authored-by: Rohit Yadav <rohityadav89@gmail.com>
Dajeong-Park
added a commit
to Dajeong-Park/ablestack-cloud
that referenced
this pull request
Nov 16, 2023
This reverts commit d980d39.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses a problem analogous to the one presented in Issue #8088. The core of the issue is repetitive mock object creation for
VolumeTOwithin the test suite ofXenServer610WrapperTest.java. In this refactoring process, I have streamlined the mock creation process forVolumeTOto enhance code maintainability and reduce redundancy.Proposed Changes
Aiming to provide a solution similar to what has been described for Issue #8088, I've introduced a method named
MockVolumeTO(String path). This method is specifically crafted to create consistent mock objects forVolumeTObased on the supplied path.Benefits of the Proposed Refactoring:
MockVolumeTO(String path)method greatly simplifies the test cases withinXenServer610WrapperTest.java, ensuring they are more comprehensible and easier to manage.VolumeTOmock creation process, developers can easily implement these changes within theMockVolumeTOmethod, preventing the need for dispersed modifications across the test class.Fixes: Issue similar to #8088