Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-21514

Add a new granularity for unit test to bypass cleanup

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 8.10
    • Fix Version/s: Postponed
    • Component/s: Tests

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              bdelbosc Benoit Delbosc
              Reporter:
              bdelbosc Benoit Delbosc
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: