You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2016/11/15 21:46:58 UTC
[jira] [Resolved] (CAMEL-10484)
AbstractCamelTestNGSpringContextTests does not support JavaConfig
[ https://issues.apache.org/jira/browse/CAMEL-10484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-10484.
---------------------------------
Resolution: Won't Fix
camel-testng is deprecated.
> AbstractCamelTestNGSpringContextTests does not support JavaConfig
> -----------------------------------------------------------------
>
> Key: CAMEL-10484
> URL: https://issues.apache.org/jira/browse/CAMEL-10484
> Project: Camel
> Issue Type: Bug
> Components: camel-test
> Affects Versions: 2.17.3
> Reporter: Chi Kim
> Priority: Minor
>
> AbstractCamelTestNGSpringContextTests seems to only support xml configuration.
> It uses CamelSpringTestContextLoader to load the context which only load bean definition using XmlBeanDefinitionReader.
> {code}
> public class CamelSpringTestContextLoader extends AbstractContextLoader {
> ...
> @Override
> public ApplicationContext loadContext(MergedContextConfiguration mergedConfig) throws Exception {
> Class<?> testClass = getTestClass();
>
> if (LOG.isDebugEnabled()) {
> LOG.debug("Loading ApplicationContext for merged context configuration [{}].", mergedConfig);
> }
>
> try {
> GenericApplicationContext context = createContext(testClass, mergedConfig);
> context.getEnvironment().setActiveProfiles(mergedConfig.getActiveProfiles());
> loadBeanDefinitions(context, mergedConfig);
> return loadContext(context, testClass);
> } finally {
> cleanup(testClass);
> }
> }
> ...
> protected void loadBeanDefinitions(GenericApplicationContext context, MergedContextConfiguration mergedConfig) {
> (new XmlBeanDefinitionReader(context)).loadBeanDefinitions(mergedConfig.getLocations());
> }
> ...
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)