The scheduler runs at noon everyday, making the listener fail if the BulkService isn't started yet.
2020-04-29T12:00:00,082 ERROR [Quartz_Worker-1] [org.nuxeo.ecm.core.event.impl.EventServiceImpl] Exception during findRetentionExpired sync listener execution, continuing to run other listeners java.lang.NullPointerException: null at org.nuxeo.ecm.core.security.RetentionExpiredFinderListener.handleEvent(RetentionExpiredFinderListener.java:53) ~[nuxeo-core-11.1-SNAPSHOT.jar:?] at org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent(EventServiceImpl.java:241) [nuxeo-core-event-11.1-SNAPSHOT.jar:?] at org.nuxeo.ecm.core.scheduler.EventJob.execute(EventJob.java:107) [nuxeo-core-event-11.1-SNAPSHOT.jar:?] at org.nuxeo.ecm.core.scheduler.EventJob.execute(EventJob.java:65) [nuxeo-core-event-11.1-SNAPSHOT.jar:?] at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.3.2.jar:?] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.3.2.jar:?
We should probably activate the scheduler service only when needed in the tests.