I have some code that is failing in my UAT environment where there are more than 50,000 accounts.
The code, does an unconstrained
SELECT ID FROM ACCOUNT and hits the SOQL limit.
The fix is obvious and trivial, however, I would like to develop a unit test for this scenario, but despite trying @future as well as trying to do it via a
Database.Batchable (which fails because execute may only be called once from a test method) I'm not able to create more than 10,000 rows (the DML limit).
We have other options for testing this, as an integration test run under another framework, but it might be cleaner for us to do this as a unit test.