Failing Unit Test: `LogFlowExecutionErrorEventHandler_Tests. it_logs_when_enabled`
Package Edition of Nebula Logger
Unlocked Package
Package Version of Nebula Logger
4.15.1
New Bug Summary
Error message: System.QueryException: List has no rows for assignment to SObject
Stack Trace: Class.LogFlowExecutionErrorEventHandler_Tests.it_logs_when_enabled: line 29, column 1
Failing line: https://github.com/jongpie/NebulaLogger/blob/9484c4be84fe47bd4b9fa7186feed1768018ae1b/nebula-logger/plugins/async-failure-additions/plugin/classes/LogFlowExecutionErrorEventHandler_Tests.cls#L29
It's looking for the automated process user which does not exist in my org. Not sure I've ever seen an org without this user, so this is interesting. I do have several Platform Integration Users, and one of them is the context user for firing platform events—which I think used to be automated process? so maybe SF has made some changes...
This isn't blocking me from doing anything, just calling it out as it's something I've noticed for a bit.
@kacrouse thanks so much for reporting this! My guess is that the autoproc user now has a different alias, so I'll look into other ways to try to query it. Once I've had some time to look into it a little more, I'll let you know what I find/if I have any follow up questions.
@kacrouse just a quick follow-up question - have you tried this in multiple orgs/sandboxes? If so, does the test fail in all of your orgs? Or is the autoproc user only missing in some orgs/environments?
I can confirm it doesn't exist in production or any sandboxes for the org I work with. I checked a couple dev editions though and it existed in those.
Awesome, thanks for the info! Offhand, I'm not sure how to handle this, but since it's not currently blocking you, I'll revisit this in the near future to see if I can find a workaround.