Issue with CDIMixIn when Camel and CDI tests exist in same project
------------------------------------------------------------------
Key: SWITCHYARD-397
URL:
https://issues.jboss.org/browse/SWITCHYARD-397
Project: SwitchYard
Issue Type: Bug
Components: test
Reporter: Keith Babo
Fix For: 0.2
I'm getting an error with the test framework when an application contains a CDI
service and a Camel service and there's a test for each one. See attached for an
example. Here's the test failure info:
{noformat}
-------------------------------------------------------------------------------
Test set: org.switchyard.issues.HelloTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.008 sec <<<
FAILURE!
Test mechanism Time elapsed: 1.005 sec <<< ERROR!
java.lang.IllegalStateException: Singleton is not set
at
org.jboss.weld.bootstrap.api.helpers.IsolatedStaticSingletonProvider$IsolatedStaticSingleton.get(IsolatedStaticSingletonProvider.java:52)
at org.jboss.weld.Container.instance(Container.java:58)
at
org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:72)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:87)
at
org.jboss.weld.environment.se.org$jboss$weld$bean-classpath-ManagedBean-org$jboss$weld$environment$se$ShutdownManager[@javax$enterprise$context$ApplicationScoped()]{}_$$_WeldClientProxy.shutdown(org$jboss$weld$bean-classpath-ManagedBean-org$jboss$weld$environment$se$ShutdownManager[@javax$enterprise$context$ApplicationScoped()]{}_$$_WeldClientProxy.java)
at org.jboss.weld.environment.se.Weld.shutdown(Weld.java:169)
at org.switchyard.test.mixins.CDIMixIn.uninitialize(CDIMixIn.java:169)
at org.switchyard.test.SwitchYardTestKit.cleanupMixIns(SwitchYardTestKit.java:607)
at org.switchyard.test.SwitchYardTestKit.cleanup(SwitchYardTestKit.java:162)
at
org.switchyard.test.SwitchYardRunner$TestLifecycleListener.testFinished(SwitchYardRunner.java:82)
at org.junit.runner.notification.RunNotifier$7.notifyListener(RunNotifier.java:145)
at org.junit.runner.notification.RunNotifier$SafeNotifier.run(RunNotifier.java:41)
at org.junit.runner.notification.RunNotifier.fireTestFinished(RunNotifier.java:142)
at
org.junit.internal.runners.model.EachTestNotifier.fireTestFinished(EachTestNotifier.java:37)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:82)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.switchyard.test.SwitchYardRunner.run(SwitchYardRunner.java:75)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
at $Proxy0.invoke(Unknown Source)
at
org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
at
org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
{noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira