I have a future job that is called from an enqueued job. The code works fine when I run manual tests; however, when my test class, which looks like the code below doesn't finish the future job:
Test.startTest(); system.enqueueJob(new EnqueuableClass([InputParameters])); Test.stopTest(); System.assertEquals(true, futureJobIsComplete());
When I remove "@future" from the method and rerun the same test method, the assertion works fine. This problem looks very similar to this in nature but they are talking about batch from schedulable and not future from queueable but I would not be surprised if the root cause is the same. Any ideas on what is causing this and how I can resolve it?
UPDATE: All futureJobIsComplete() does is to query the database to assert the records that the futureJob was supposed to update are updated.