Uploaded image for project: 'CDI TCK'
  1. CDI TCK
  2. CDITCK-375

CustomCDIProviderTest based on incorrect assumption

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.1.3.Final, 1.2.0.Beta1
    • 1.1.2.Final
    • None
    • None
    • Workaround Exists
    • Hide

      <class name="org.jboss.cdi.tck.tests.lookup.manager.provider.custom.CustomCDIProviderTest">
      <methods>
      <exclude name=".*"/>
      </methods>
      </class>

      Show
      <class name="org.jboss.cdi.tck.tests.lookup.manager.provider.custom.CustomCDIProviderTest"> <methods> <exclude name=".*"/> </methods> </class>

    Description

      They way javax.enterprise.inject.spi.CDI works is that each time the current() method is called, the CDI class invokes CDIProvider.getCDI() to retrieve a (possibly new) CDI instance.

      org.jboss.cdi.tck.tests.lookup.manager.provider.custom.ForwardingCDIProvider works with an assumption that it is safe to take a single CDI instance and always return it wrapped. However, a custom CDIProvider may be returning different CDI instances in different contexts (e.g. for different application). Therefore, the way ForwardingCDIProvider is currently implemented may cause failures in tests that follow CustomCDIProviderTest if the CDI implementation uses these context-sensitive CDI instances

      Attachments

        Issue Links

          Activity

            People

              mkouba@redhat.com Martin Kouba
              rhn-engineering-jharting Jozef Hartinger
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty