At the moment the repository cleanup (org.nuxeo.ecm.core.test.CoreFeature#cleanupSession is always done after test suite (Granularity.CLASS or Granularity.UNDEFINED) or after each test methods (Granularity.METHOD).
For Granularity.CLASS this is useless because the repository is wiped anyway, it only slows down the test tear down.
For unit test that creates lots of documents, this is a show stopper. It takes 10s to create 10k docs and 60s to run the cleanup.
We could add a new Granularity.NONE which skip the cleanupSession.
or we could change the Granularity.CLASS to skip the cleanupSession and expect improvement in the tests execution duration.