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

Guice error when using AuditFeature in Junit test

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 5.7.3
    • Fix Version/s: QualifiedToSchedule
    • Component/s: Audit

      Description

      As seen with Damien Metzler and Laurent Doguin, when using the following code the Junit test cannot be launched.

      package com.nuxeo.itcs.catod.operations;
      
      import static org.junit.Assert.assertNotNull;
      
      import org.junit.Test;
      import org.junit.runner.RunWith;
      import org.nuxeo.ecm.core.api.CoreSession;
      import org.nuxeo.ecm.platform.audit.AuditFeature;
      import org.nuxeo.runtime.test.runner.Features;
      import org.nuxeo.runtime.test.runner.FeaturesRunner;
      
      import com.google.inject.Inject;
      
      @RunWith(FeaturesRunner.class)
      @Features({ AuditFeature.class })
      public class SimpleTest {
      
      
          @Inject
          CoreSession session;
      
          @Test
          public void testName() throws Exception {
              assertNotNull(session);
          }
      }

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: