Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 876968

Summary: Infinispan CDI tests are not running
Product: [JBoss] JBoss Data Grid 6 Reporter: Anna Manukyan <amanukya>
Component: InfinispanAssignee: Tristan Tarrant <ttarrant>
Status: CLOSED UPSTREAM QA Contact: Martin Gencur <mgencur>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: jdg-bugs
Target Milestone: ER2   
Target Release: 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
No docs text needed for Beta
Story Points: ---
Clone Of:
: 911124 (view as bug list) Environment:
Last Closed: 2025-02-10 03:26:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 911124, 1010419    
Attachments:
Description Flags
TRACE LOGS none

Description Anna Manukyan 2012-11-15 12:06:41 UTC
All CDI tests are not running in scope of JDG testsuite. 

The following error is thrown:

No TestRunnerAdaptor found, @BeforeSuite has not been called

You can see the full exception log here (e.g. for one test):

http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/edg-60-ispn-testsuite-rhel/48/jdk=java17_default,label=RHEL6_x86_64/testReport/org.infinispan.cdi.test.distexec/DistributedExecutorCDITest/testBasicInvocation/

All failures are available here:

http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/edg-60-ispn-testsuite-rhel/48/testReport/

Comment 1 Anna Manukyan 2012-11-15 12:17:14 UTC
This issue doesn't appear in Infinispan testsuite, as the TestNG version is upgraded there.

Currently the testNG version in Infinispan is: 6.7, and in JDG it is: 5.14.10-redhat-1

Perhaps, the upgrade will solve the issue.

Comment 2 Tristan Tarrant 2012-11-20 15:28:16 UTC
This requires upgrading Shrinkwrap. Will have a try during the ER5 cycle

Comment 3 Tristan Tarrant 2013-01-21 12:59:06 UTC
The solution to this requires enabling Maven Central as well as the MEAD repo.

Comment 4 Anna Manukyan 2013-01-24 13:16:43 UTC
Hi,

while running CDI tests on Jenkins with enabled Maven Central and MEAD repos, the following issue appears: 
Running TestSuite
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNGMapConfigurator@6f5f7161
Jan 24, 2013 8:03:35 AM org.jboss.shrinkwrap.resolver.impl.maven.LogTransferListerer transferFailed
WARNING: Failed downloading org/jboss/jboss-parent/9-redhat-1/jboss-parent-9-redhat-1.pom from http://snapshots.jboss.org/maven2/, reason: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to locate resource in repository
Jan 24, 2013 8:03:35 AM org.jboss.shrinkwrap.resolver.impl.maven.LogTransferListerer transferFailed
WARNING: Failed downloading org/jboss/jboss-parent/9-redhat-1/jboss-parent-9-redhat-1.pom from http://repository.jboss.org/maven2/, reason: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to locate resource in repository
Jan 24, 2013 8:03:42 AM org.jboss.shrinkwrap.resolver.impl.maven.LogTransferListerer transferFailed
WARNING: Failed downloading org/jboss/jboss-parent/9-redhat-1/jboss-parent-9-redhat-1.pom from https://repository.jboss.org/nexus/content/groups/developer/, reason: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to locate resource in repository
Jan 24, 2013 8:03:42 AM org.jboss.shrinkwrap.resolver.impl.maven.LogTransferListerer transferFailed
WARNING: Failed downloading org/jboss/jboss-parent/9-redhat-1/jboss-parent-9-redhat-1.pom from https://repository.jboss.org/nexus/content/repositories/deprecated/, reason: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to locate resource in repository
Jan 24, 2013 8:03:42 AM org.jboss.shrinkwrap.resolver.impl.maven.LogTransferListerer transferFailed
WARNING: Failed downloading org/jboss/jboss-parent/9-redhat-1/jboss-parent-9-redhat-1.pom from http://repo1.maven.org/maven2/, reason: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to locate resource in repository
Configuration method arquillianBeforeClass(org.infinispan.cdi.test.cache.embedded.configured.ConfiguredCacheTest) threw an exception
2013-01-24 08:03:42,883 ERROR [UnitTestTestNGListener] (testng-ConfiguredCacheTest) Configuration method arquillianBeforeClass(org.infinispan.cdi.test.cache.embedded.configured.ConfiguredCacheTest) threw an exception
java.lang.RuntimeException: Could not invoke deployment method: public static org.jboss.shrinkwrap.api.Archive org.infinispan.cdi.test.cache.embedded.configured.ConfiguredCacheTest.deployment()
	at org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.invoke(AnnotationDeploymentScenarioGenerator.java:160)
	at org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.generateDeployment(AnnotationDeploymentScenarioGenerator.java:94)
	at org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.generate(AnnotationDeploymentScenarioGenerator.java:57)
	at org.jboss.arquillian.container.test.impl.client.deployment.DeploymentGenerator.generateDeployment(DeploymentGenerator.java:79)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
	at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
	at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:100)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
	at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
	at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
	at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:80)
	at org.jboss.arquillian.testng.Arquillian.arquillianBeforeClass(Arquillian.java:103)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
	at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
	at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:175)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:107)
	at org.testng.TestRunner.privateRun(TestRunner.java:767)
	at org.testng.TestRunner.run(TestRunner.java:617)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
	at org.testng.SuiteRunner.run(SuiteRunner.java:240)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:51)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:85)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1197)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1122)
	at org.testng.TestNG.run(TestNG.java:1030)
	at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:76)
	at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:161)
	at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:101)
	at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:115)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
	at org.apache.maven.plugin.surefire.InPluginVMSurefireStarter.runSuitesInProcess(InPluginVMSurefireStarter.java:74)
	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:194)
	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAllProviders(AbstractSurefireMojo.java:176)
	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:135)
	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:98)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.invoke(AnnotationDeploymentScenarioGenerator.java:156)
	... 97 more
Caused by: org.jboss.shrinkwrap.resolver.api.ResolutionException: Found 1 problems while building POM model from W:\workspace\edg-60-ispn-testsuite-windows\jdk\java17_default\label\dev98-W2k8r2-x86_64\cdi\extension\pom.xml1/ [FATAL] Non-resolvable parent POM for org.infinispan:infinispan-parent:5.2.0.CR2-redhat-1: Failed to resolve POM for org.jboss:jboss-parent:9-redhat-1 due to Could not find artifact org.jboss:jboss-parent:pom:9-redhat-1 in snapshots.jboss.org (http://snapshots.jboss.org/maven2) and 'parent.relativePath' points at no local POM @ org.infinispan:infinispan-parent:5.2.0.CR2-redhat-1, W:\workspace\edg-60-ispn-testsuite-windows\jdk\java17_default\label\dev98-W2k8r2-x86_64\parent\pom.xml

	at org.jboss.shrinkwrap.resolver.impl.maven.MavenRepositorySystem.loadPom(MavenRepositorySystem.java:154)
	at org.jboss.shrinkwrap.resolver.impl.maven.MavenRepositorySystem.loadPom(MavenRepositorySystem.java:126)
	at org.jboss.shrinkwrap.resolver.impl.maven.MavenBuilderImpl.loadMetadataFromPom(MavenBuilderImpl.java:153)
	at org.infinispan.cdi.test.testutil.Deployments.baseDeployment(Deployments.java:55)
	at org.infinispan.cdi.test.cache.embedded.configured.ConfiguredCacheTest.deployment(ConfiguredCacheTest.java:49)
	... 102 more
Caused by: org.apache.maven.model.building.ModelBuildingException: 1 problem was encountered while building the effective model for org.infinispan:infinispan-cdi:5.2.0.CR2-redhat-1
[FATAL] Non-resolvable parent POM for org.infinispan:infinispan-parent:5.2.0.CR2-redhat-1: Failed to resolve POM for org.jboss:jboss-parent:9-redhat-1 due to Could not find artifact org.jboss:jboss-parent:pom:9-redhat-1 in snapshots.jboss.org (http://snapshots.jboss.org/maven2) and 'parent.relativePath' points at no local POM @ org.infinispan:infinispan-parent:5.2.0.CR2-redhat-1, W:\workspace\edg-60-ispn-testsuite-windows\jdk\java17_default\label\dev98-W2k8r2-x86_64\parent\pom.xml

	at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:847)
	at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:670)
	at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:308)
	at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:232)
	at org.jboss.shrinkwrap.resolver.impl.maven.MavenRepositorySystem.loadPom(MavenRepositorySystem.java:140)
	... 106 more

Comment 5 Anna Manukyan 2013-01-24 13:20:50 UTC
Created attachment 686728 [details]
TRACE LOGS

Comment 6 Tristan Tarrant 2013-01-24 13:44:14 UTC
Anna, did you run this against BOTH Mead and Maven Central ?

Comment 7 Anna Manukyan 2013-01-24 14:35:07 UTC
Yes Tristan, both repos are enabled. 
And the thing is that test is running, it starts to generate the archive file and while processing parent pom.xml it fails on jboss-parent dependency. 

I guess, in Deployments.java class before calling loadMetadataFromPom() method it is necessary to call configureFrom(filePath) method, which will load the settings file with the given path which should  contain the path to MEAD & Central repos, otherwise it uses the default maven settings. 

Please correct me if I'm wrong.

Comment 12 Martin Gencur 2013-07-24 11:54:53 UTC
We're still not able to run the test suite with productized libraries and Mean repo.

I got this far:

In order to workaround the bug in Shrinkwrap which was not able to find jboss-parent artifact, I had to add <repository> definitions with Mean repository directly to cdi/extension/pom.xml - adding them to default settings.xml did not help.

After this change, I activated the "default" profile in cdi/extension/pom.xml and added the following dependency (otherwise CNFE thrown on javax/servlet/Filter and more):
<dependency>
   <groupId>org.jboss.spec</groupId>
   <artifactId>jboss-javaee-6.0</artifactId>
   <type>pom</type>
   <version>3.0.2.Final-redhat-4</version>
   <scope>test</scope>
</dependency>

Even after that, most of the tests fail:
Failed tests:   arquillianBeforeTest(org.infinispan.cdi.test.cachemanager.embedded.DefaultConfigurationTest): Could not inject members
  arquillianBeforeTest(org.infinispan.cdi.test.cachemanager.embedded.programmatic.ProgrammaticCacheContainerTest): Could not inject members
  arquillianBeforeTest(org.infinispan.cdi.test.cachemanager.embedded.registration.CacheRegistrationTest): Could not inject members
  arquillianBeforeTest(org.infinispan.cdi.test.cachemanager.embedded.external.ExternalCacheContainerTest): Could not inject members
  arquillianBeforeTest(org.infinispan.cdi.test.cachemanager.embedded.xml.XMLConfiguredCacheContainerTest): Could not inject members
  arquillianBeforeTest(org.infinispan.cdi.test.interceptor.CachePutInterceptorTest): Could not inject members
  arquillianBeforeTest(org.infinispan.cdi.test.interceptor.CacheRemoveEntryInterceptorTest): Could not inject members
  arquillianBeforeTest(org.infinispan.cdi.test.interceptor.CacheRemoveAllInterceptorTest): Could not inject members
  arquillianBeforeTest(org.infinispan.cdi.test.interceptor.CacheResultInterceptorTest): Could not inject members
  testinvokeMapReduceOnSubsetOfKeys(org.infinispan.cdi.test.distexec.WordCountMapReduceCDITest): java.util.concurrent.ExecutionException: org.infinispan.remoting.RemoteException: ISPN000217: Received exception from WordCountMapReduceCDITest-NodeB-28747, see cause for remote stack trace
  testinvokeMapReduceWithInputCacheOnSubsetOfKeys(org.infinispan.cdi.test.distexec.WordCountMapReduceCDITest): java.util.concurrent.ExecutionException: org.infinispan.remoting.RemoteException: ISPN000217: Received exception from WordCountMapReduceCDITest-NodeB-28747, see cause for remote stack trace
  testBasicInvocation(org.infinispan.cdi.test.distexec.DistributedExecutorCDITest): org.jboss.weld.exceptions.IllegalArgumentException: WELD-001305 The given type class org.infinispan.cdi.DefaultEmbeddedCacheConfigurationProducer is not a type of the bean Managed Bean [class org.infinispan.cdi.AdvancedCacheProducer] with qualifiers [@Any @Synthetic]
  arquillianBeforeTest(org.infinispan.cdi.test.cache.embedded.specific.SpecificCacheManagerTest): Could not inject members
  arquillianBeforeTest(org.infinispan.cdi.test.cache.embedded.configured.ConfiguredCacheTest): Could not inject members
  arquillianBeforeTest(org.infinispan.cdi.test.cache.embedded.DefaultCacheTest): Could not inject members

Tests run: 99, Failures: 15, Errors: 0, Skipped: 75

Not sure what to do next. I got stuck.

Comment 13 Anna Manukyan 2013-08-26 14:58:48 UTC
Update:

the CDI tests on productised Infinispan are one step forward. 

At the moment for JDG 6.2.0.DR3 I'm getting the following exception: 

org.jboss.arquillian.container.test.impl.client.deployment.ValidationException: DeploymentScenario contains a target (_DEFAULT_) not matching any defined Container in the registry. Please include at least 1 Deployable Container on your Classpath.

I've compared the cdi/extension pom.xml for upstream and productised Infinispan and found out some changes on productised version:

1) The default profile is not active by default for productised version of infinispan/cdi;

2) the default profile doesn't contain dependency for jboss-javaee-6.0;

I've tried to put these 2 things into productised infinispan/cdi pom.xml and run the tests:

  In this case the tests are working smoothly and passing.

Best regards,
Anna.

Comment 16 Red Hat Bugzilla 2025-02-10 03:26:57 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.