Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-10721

jcache/tck-runner module should not unpack cache-tests

    XMLWordPrintable

Details

    • DataGrid Sprint #34, DataGrid Sprint #35, DataGrid Sprint #36, DataGrid Sprint #37, DataGrid Sprint #38, DataGrid Sprint #39

    Description

      The jcache/tck-runner module is unpacking the cache-tests dependency (the TCK) in the target directory so that the Surefire Maven plugin can find and run the tests.

      This started breaking since the upgrade to Weld 2.3.4.Final (ISPN-10383), because Weld now finds the TCK beans in two different locations:

      [2019-10-01T07:12:01.511Z] [OK:   214, KO:     1, SKIP:     0] Test failed: InterceptionUsingCacheConfigTest.test_AT_CacheResult
      [2019-10-01T07:12:01.511Z] org.jboss.weld.exceptions.AmbiguousResolutionException: WELD-001318: Cannot resolve an ambiguous dependency between: 
      [2019-10-01T07:12:01.511Z]   - Managed Bean [class manager.ClassLevelCacheConfigBlogManagerImpl] with qualifiers [@Any @Default],
      [2019-10-01T07:12:01.511Z]   - Managed Bean [class manager.ClassLevelCacheConfigBlogManagerImpl] with qualifiers [@Any @Default]
      [2019-10-01T07:12:01.511Z] 	at org.jboss.weld.manager.BeanManagerImpl.resolve(BeanManagerImpl.java:1235)
      [2019-10-01T07:12:01.511Z] 	at org.jsr107.tck.annotations.cdi.test.CdiBeanProvider.getBeanByType(CdiBeanProvider.java:47)
      [2019-10-01T07:12:01.511Z] 	at org.jsr107.tck.annotation.AbstractInterceptionTest.getBeanByType(AbstractInterceptionTest.java:66)
      [2019-10-01T07:12:01.511Z] 	at org.jsr107.tck.annotation.InterceptionUsingCacheConfigTest.getBlogManager(InterceptionUsingCacheConfigTest.java:23)
      [2019-10-01T07:12:01.511Z] 	at org.jsr107.tck.annotation.AbstractBlogManagerInterceptionTest.before(AbstractBlogManagerInterceptionTest.java:26)
      

      Fortunately we don't have to unpack the tests in our working directory, we can tell Surefire to run the tests from the jar instead:

                           <dependenciesToScan>
                              <dependency>javax.cache:cache-tests</dependency>
                           </dependenciesToScan>
      

      Attachments

        Issue Links

          Activity

            People

              dberinde@redhat.com Dan Berindei (Inactive)
              dberinde@redhat.com Dan Berindei (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: