I have a flow which subscribes to a platform Event. This flow consumes the event and inserts a record. My test class is:
Test.startTest();
Database.SaveResult result = EventBus.publish(testEvent);
System.assertEquals(true, result.isSuccess());
Test.getEventBus().deliver();
Test.stopTest();
It looks like only Apex triggers are running after the Test.getEventBus().deliver() statement while Flow is not at all getting triggered. I thoroughly checked the logs and there is no logs of the Flow running. I checked that the Flow is Active. Salesforce explicitly says that flows are triggered from apex test class here: https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platform_events_test_events.htm