Add tests to reach 100% Clover coverage; run coverage job on JDK 17#1047
Open
Add tests to reach 100% Clover coverage; run coverage job on JDK 17#1047
Conversation
3ad982e to
60ea033
Compare
Cover previously-uncovered branches in ProviderKey, ProviderPrivateKey, ProvidedPrivateKeyBuilder, KeysBridge, and JcaTemplate.JcaInstanceFactory. On macOS these branches are only exercised by Pkcs11Test (which fails locally due to a SoftHSM2/SunPKCS11 ECDSA incompatibility), so explicit unit tests are added to cover them on all platforms. Switch the CI code-coverage job from Zulu JDK 8 to Temurin JDK 17, and remove the now-unnecessary 'sleep 90s' workaround.
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
ProviderKey,ProviderPrivateKey,ProvidedPrivateKeyBuilder,KeysBridge, andJcaTemplate.JcaInstanceFactorythat were only previously exercised byPkcs11Testcode-coveragejob from Zulu JDK 8 to Temurin JDK 17sleep 90sworkaround (no longer needed once coverage is stable)Why new tests?
On macOS,
Pkcs11Testfails with aCKR_OPERATION_NOT_INITIALIZEDerror due to a known SoftHSM2/SunPKCS11 ECDSA incompatibility. The branches covered by that test were therefore uncovered locally. The new unit tests cover the same branches directly, making coverage pass on all platforms regardless of PKCS11 availability.Local verification
Pkcs11TestNote: the last passing CI run on master (#18535374355) used Ubuntu + Zulu JDK 8, where
Pkcs11Testruns successfully and covered those branches. This PR makes coverage robust to platform differences.