* Test.startTest(); * System.enqueueJob(new MyJob()); * Test.stopTest(); * System.debug('Quering record for assertion');
Expected Queueable job execution:
* Job Start * Query records * Callout * --------------> @future method * DML1 * * Job End * Callout * DML2
When quering record after Test.stopTest() changes of DML1 are visible only, but not of DML2.
Actual debug log order:
14:49:52.9 -> DML1 14:49:52.9 -> Quering record for assertion 14:49:52.237 -> DML2
Expected log order:
1. DML1 2. DML2 3. Quering record for assertion
Problem: after Test.stopTest() I query records and want to assert changes of DML1 and DML2 together, but record is only at DML1 state.