CustomObject sync finalization#573
Merged
leungkinghin-ct merged 26 commits intoadd-customobjects-syncfrom Sep 22, 2020
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## add-customobjects-sync #573 +/- ##
============================================================
+ Coverage 98.93% 99.17% +0.23%
- Complexity 1889 1898 +9
============================================================
Files 160 160
Lines 4700 4718 +18
Branches 274 274
============================================================
+ Hits 4650 4679 +29
+ Misses 29 20 -9
+ Partials 21 19 -2
Continue to review full report at Codecov.
|
lojzatran
suggested changes
Sep 21, 2020
lojzatran
approved these changes
Sep 21, 2020
Contributor
|
@leungkinghin I just noticed that most of the methods in IT are mocked. Isn't it better to put them to unit tests? Why do you need integration tests for that? If it's too much work, then I guess you can merge this PR now, but later try to refactor it a bit. The less IT we have, the better as they're slow :) |
JudeNiroshan
suggested changes
Sep 21, 2020
This reverts commit 390680b.
JudeNiroshan
suggested changes
Sep 21, 2020
JudeNiroshan
approved these changes
Sep 22, 2020
leungkinghin-ct
added a commit
that referenced
this pull request
Sep 22, 2020
* Implement utility class and helper classes for CustomObjectSync * Enhance the CustomObjectSyncUtilsTest to check JsonNode in different datatypes. * Remove non-null annotation in CustomObjectSyncUtils * Fix incorrect javadoc in CustomObjectSyncStatistics * Remove unused variable in CustomObjectSyncUtilsTest * Refactor CustomObjectSyncUtilsTest * Revert "Refactor CustomObjectSyncUtilsTest" This reverts commit 1e6b7b4. * Remove blank line * Refactor CustomObjectSyncUtilsTest * Remove batchElements from CustomObjectSyncUtils * Remove unused import and change the class variables to be local variables * Remove spaces in CustomObjectSyncUtilsTest * Add customobjects sync (#569) * Implement CustomObjectSync * Enhance the CustomObjectSyncUtilsTest to check JsonNode in different datatypes. * Inherit CustomObjetSync from BaseSync * Remove batchElements from CustomObjectSyncUtils * Remove non-null annotation in CustomObjectSyncUtils * Fix import problem in CustomObjectSync * Add override methods for equals and hashCode * Add assertion for CustomObjectSyncStatistics * Create CustomObjectSyncStatisticsAssert class * Add first unit test scenario to CustomObjectSyncTest * Add unit test scenario * Implement unit test for custom object update in CustomObjectSyncTest * Change the deprecated method * Fix checkstyle problem * Fix unit case problem in mocking composite identifier * Remove unused import in CustomObjectCompositeIdentifier * Remove unused import in CustomObjectSyncTest * Revert the change on CustomObjectSyncUtilsTest * Revert the change in CustomObjectSyncUtilsTest * Refactor sync class to increase coverage * Remove unused import in CustomObjectSyncTest * Apply correct style formatting * Fix checkstyleMain issues * Fix checkStyle issue * Add public constructor in CustomObjectSync * Remove blank line after javadoc * Apply method reference in lambda in CustomObjectSync * Update error message * Change javadoc for method CustomObjectSync.validateDraft() * Change error messages * Avoid calling CTP when two custom objects are identical. * Fix unit test expected error message * Correct the javadoc for updateCustomObject() * Add unit test cases and fix bugs * Rename unit test method * Add unit test case to cover update retry failure * Fix expected result in unit test * Remove blank lines * Refactor CustomObjectSyncTest * Fix findbugs problem * Rename Response to be ResponseEntry * Remove blank lines and fix indentation * Fix indentation in CustomObjectServiceImpl * Remove blank lines * Add equals() and hashCode() in CustomObjectCompositeIdentifier * Add unit test cases * Fix indentation in CustomObjectSyncTest * Add CustomObjectCompositeIdentifierTest Co-authored-by: ninalindl <nina.lindl@web.de> * CustomObject sync finalization (#573) * Add integration tests in CustomObjectSyncIT * Fix integration test case for update custom object * Fix CustomObjectSync for ConcurrentModificationException handling * Fix refactoring problem in BaseService * Delete newly created custom object between every test case * Update README.md * Update README.md * Add CUSTOM_OBJECT_SYNC.md * Add release note for v2.1.0 * Update release notes * Update version number to v2.1.0 * Fix documentation * Remove redundant java comment * Fix javadoc and java comments * Remove empty line in BaseService * Remove empty lines in CustomObjectSyncIT * Add javadoc for CustomObjectServiceImpl.executeCreateCommand() * Revert "Add javadoc for CustomObjectServiceImpl.executeCreateCommand()" This reverts commit 390680b. * Add javadoc to describe CustomObjectServiceImpl.executeCreateCommand() * Modify test case method naming in CustomObjectSyncIT * Update RELEASE_NOTES.md * Update CUSTOM_OBJECT_SYNC.md * Remove unused import * Modify javadoc for CustomObjectServiceImpl.executeCreateCommand() * Revert "Modify javadoc for CustomObjectServiceImpl.executeCreateCommand()" This reverts commit 9ad46a0. * Modify javadoc for CustomObjectSerivceImpl.executeCreateCommand() Co-authored-by: ninalindl <nina.lindl@web.de> * Add unit test case for CustomObjectServiceImpl to increase coverage rate * Fix indentation * Add link in mkdocs.yml * Add private constructor to increase coverage * Revert "Add private constructor to increase coverage" This reverts commit 6e71275. * Update RELEASE_NOTES Co-authored-by: ninalindl <nina.lindl@web.de>
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.
Summary
Finalize the custom object sync implementation
Description
Include integration test for custom object sync, and the handling of ConcurrentModificationException when doing CO upsert action.
Relevant Issues
#565
Todo
Hints for Review
Implementation of CustomObjectSyncIT.
BaseServicehas been refactored.CustomObjectServiceoverridesexecuteCreateCommand()to throwConcurrentModificationExceptionto sync class for further handling.