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

Make test core feature compatible with transactional feature

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.5
    • Fix Version/s: 5.5.0-HF03, 5.6-RC1, 5.6
    • Component/s: None
    • Upgrade notes:
      Hide

      Core feature is providing a guice scope for a better handling of the session reset. In tests,
      features that want to configure a service provider should now provide a
      org.nuxeo.runtime.test.runner.ServiceProvider instead of com.google.inject.Provider.
      This let the feature being able to override the default scope binding.

      Show
      Core feature is providing a guice scope for a better handling of the session reset. In tests, features that want to configure a service provider should now provide a org.nuxeo.runtime.test.runner.ServiceProvider instead of com.google.inject.Provider. This let the feature being able to override the default scope binding.

      Description

      When adding transactional feature to a test, core feature should load the pooled repository configuration instead of the default one. Also, granularity should be set to method according to transaction injection model.

      Another problem, is about the core session injection. In Junit4, the test life-cycle is based on the method invocation. Guice injector should be configured before the test creation. This is not the case when using the before methods in runner features. We should provide a new API in runner features for being just handled before the test setup and after.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: