Skip to content

SYNCHRONOUS_DML in a test context - Integration test #454

Answered by jongpie
JeroenSfdc asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @JeroenSfdc I think you are doing everything correctly - I think that the issue is unfortunately something that I'll need to address within Nebula Logger's code. Right now, during a test context, Nebula Logger does not load any custom metadata records, including LoggerSObjectHandler__mdt records, which are a critical part of how SYNCHRONOUS_DML is implemented. This has an unfortunate side effect of making it impossible for you to properly test the SYNCHRONOUS_DML save method in the managed package.

I am currently finishing up the next managed package release (v4.10) - I'm already behind schedule to get it released, so I don't think I'll be able to address this issue right now. However…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@jongpie
Comment options

@JeroenSfdc
Comment options

@jongpie
Comment options

@jongpie
Comment options

Answer selected by JeroenSfdc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Type: Bug Something isn't working Logging Source: Apex Items related to using Logger within Apex Layer: Configuration Items related to the custom hierarchy setting LoggerSettings__c or any included custom metadata type Layer: Log Management Items related to the custom objects & Logger Console app tests Relates to Apex or LWC jest tests
2 participants