Skip to content

Testing Fixes & Improvements

Compare
Choose a tag to compare
@jongpie jongpie released this 07 Dec 20:34
· 85 commits to main since this release
3317ac8

Pipeline Improvements

  • Fixed an issue that was recently introduced into the pipeline (build.yml) that was preventing tests in the extra-tests folder from being deployed/executed, which caused the reported code coverage to drop several percentage points (95% to 91%)
    • This was caused by recently switching to use sfdx force:source:push instead of sfdx force:source:deploy - for some reason, the extra-tests folder was not being pushed to the scratch orgs in the pipeline, so I've reverted back to using sfdx force:source:deploy
  • Updated package-lock.json to fix a dependabot security alert in GitHub
  • Renamed npm scripts 'lint' to 'scan'

Core Unlocked Package Changes

After resolving the above pipeline issue, I've updated several Apex test classes to cover edge scenarios that the existing tests didn't cover - this also led to fixing a few issues:

  • Fixed an issue in LoggerPlugin where a runtime error would occur if the specified Apex class for a plugin did not implement the corresponding interface (LoggerPlugin.Batchable or LoggerPlugin.Triggerable) - now, LoggerPlugin gracefully skips any misconfigured plugins/classes.
  • Updated LogBatchPurgeController class to use strongly-typed SObject tokens, instead of hardcoded Strings
  • Removed some try-catch blocks in a few classes where an exception is not expected to occur
  • Removed an old/deprecated private method, LogEntryEventBuilder.setTransactionDetails()
  • Fixed an incorrect Boolean check in LoggerEngineDataSelector that prevented Network data from being properly queried
  • Fixed #424 - the field LogEntryEvent__e.RequestId__c had been incorrectly flagged as a required field, and as reported by @chazwatkins, the value of System.Request.getCurrent().getRequestId() is null for the autoproc user (and possibly other scenarios).

Full Changelog: v4.9.7...v4.9.8