forked from FISCO-BCOS/java-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Add unit tests to increase JaCoCo coverage from 30.1% to 30.7% #1
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
Merged
Conversation
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
…fix duplicate resources handling Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com>
Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com>
Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com>
Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add unit tests to increase JaCoCo coverage
Add unit tests to increase JaCoCo coverage from 30.1% to 30.7%
Nov 4, 2025
Copilot finished work on behalf of
kyonRay
November 4, 2025 07:27
kyonRay
approved these changes
Nov 4, 2025
kyonRay
added a commit
that referenced
this pull request
Nov 13, 2025
…S#945) * <fix>(build): update dependencies version, add UT with AI. * Add unit tests to increase JaCoCo coverage from 30.1% to 30.7% (#1) * Initial plan * Initial setup: Upgrade Gradle to 7.6.4 for Java 17 compatibility and fix duplicate resources handling Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * Add unit tests for model classes and exceptions to improve coverage Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * Add more unit tests for model and enum classes to increase coverage Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * Add unit tests for crypto exception classes to increase coverage Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * Downgrade Gradle version to 6.3 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * Add unit tests for SDK v3 client and transaction packages (#2) * Initial plan * Add unit tests for client and transaction packages - part 1 Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * Add more unit tests for client protocol response and transaction dto classes Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * Add unit tests for LogFilterRequest, model BO classes and CommonConstant Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * Fix ResultCodeEnumTest to avoid mutating enum state in tests Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * <fix>(test): fixed tests path. * Add comprehensive test coverage for uncovered utility, protocol, and codec classes (#4) * Initial plan * Add comprehensive tests for ByteUtils, ThreadPoolService, SystemInformation, SecureRandomUtils, and LinuxSecureRandom Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * Add comprehensive tests for JsonRpcRequest and TopicTools Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * Address code review feedback - fix resource cleanup and remove redundant tests Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * <fix>(CI): fix windows ci version to 2025. * <fix>(build): update publish url to central.sonatype. --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
kyonRay
added a commit
that referenced
this pull request
Nov 13, 2025
* Initial plan * Initial setup: Upgrade Gradle to 7.6.4 for Java 17 compatibility and fix duplicate resources handling Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * Add unit tests for model classes and exceptions to improve coverage Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * Add more unit tests for model and enum classes to increase coverage Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * Add unit tests for crypto exception classes to increase coverage Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * Downgrade Gradle version to 6.3 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com>
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.
Adds comprehensive unit tests for foundational model, enum, and exception classes to improve code coverage and establish testing patterns.
Build System
duplicatesStrategy = DuplicatesStrategy.INCLUDEto resolve resource conflictTest Coverage Added (16 classes, 270+ methods)
Model & Constants
NodeType,CryptoType,ConstantConfig- enum and constant validationPrecompiledRetCode,PrecompiledConstant- error code and limit constants with lookup logicEnumNodeVersion- version parsing, comparison, and compatibility conversionMerkleProofUnit,NodeVersion.ClientVersion- POJO getters/setters/equals/hashCodeExceptions
ConfigExceptionTransactionBaseException,JsonExceptionHashException,KeyPairException,SignatureException,UnsupportedCryptoTypeException,LoadKeyStoreExceptionAll tests validate constructors, message/cause handling, equals/hashCode contracts, and edge cases (null, empty strings).
Coverage Impact
Tests follow existing JUnit 4 patterns and provide regression protection for SDK core classes.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.