Enable CDI in SwitchYard unit tests #549

Closed
wants to merge 1 commit into from

2 participants

@dtschan

https://issues.jboss.org/browse/SWITCHYARD-1645

This enhancement extends the CDIMixIn to allow the use of CDI in SwitchYard unit tests including, but not limited to @Inject. See https://community.jboss.org/thread/231512 for details.

@rcernich
jboss-switchyard member

Hey Daniel,

Thank you for the patch. I'd be happy to push this. Could you please sign the CLA here: https://cla.jboss.org/index.seam.

Also, could you add the bug identifier to the beginning of the commit message (SWITCHYARD-1645), as documented under "Contributing a Change" here: https://community.jboss.org/wiki/DevelopmentOnSwitchYard

Thanks in advance,
Rob

@dtschan

Hi Rob

Done and done. Additionaly I rebased against the current master.
Thanks in advance for merging my patch.

Kind regards
Daniel

@rcernich
jboss-switchyard member

processing

@rcernich
jboss-switchyard member

Hey Daniel,

I can't build components with this change. Maven is complaining about a cycle in the build. The error is below. I suspect the mixin project builds fine by itself, but the parent module, components, cannot be built.

[ERROR] The projects in the reactor contain a cyclic reference: Edge between 'Vertex{label='org.switchyard.components:switchyard-component-bean:2.0.0-SNAPSHOT'}' and 'Vertex{label='org.switchyard.components:switchyard-component-test-mixin-cdi:2.0.0-SNAPSHOT'}' introduces to cycle in the graph org.switchyard.components:switchyard-component-test-mixin-cdi:2.0.0-SNAPSHOT --> org.switchyard.components:switchyard-component-bean:2.0.0-SNAPSHOT --> org.switchyard.components:switchyard-component-test-mixin-cdi:2.0.0-SNAPSHOT -> [Help 1]

@dtschan

Hi Rob

Ah, I forgot to rerun all component tests after the rebase. This worked before. I'll try to rewrite CDIMixInInjectionTest so that I can drop the dependency to the bean component, which will solve the build problem.

Kind regards
Daniel

@dtschan

Hi Rob

I made a small change to CDIMixIn, lines 150 through 154, which allowed me to drop the dependency on the bean component. All component tests are green again.

Kind regards
Daniel

@rcernich
jboss-switchyard member

processing

@rcernich
jboss-switchyard member

merged

@rcernich rcernich closed this Mar 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment