You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by as...@apache.org on 2016/08/18 16:19:45 UTC
camel git commit: Explicitly set Weld shutdown hook behavior in Camel
CDI test runner
Repository: camel
Updated Branches:
refs/heads/master eb2f171ff -> 66e07ee27
Explicitly set Weld shutdown hook behavior in Camel CDI test runner
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/66e07ee2
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/66e07ee2
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/66e07ee2
Branch: refs/heads/master
Commit: 66e07ee277390a50e83e99eccae41fa3a949547f
Parents: eb2f171
Author: Antonin Stefanutti <an...@stefanutti.fr>
Authored: Thu Aug 18 18:19:37 2016 +0200
Committer: Antonin Stefanutti <an...@stefanutti.fr>
Committed: Thu Aug 18 18:19:37 2016 +0200
----------------------------------------------------------------------
.../main/java/org/apache/camel/test/cdi/CamelCdiDeployment.java | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/66e07ee2/components/camel-test-cdi/src/main/java/org/apache/camel/test/cdi/CamelCdiDeployment.java
----------------------------------------------------------------------
diff --git a/components/camel-test-cdi/src/main/java/org/apache/camel/test/cdi/CamelCdiDeployment.java b/components/camel-test-cdi/src/main/java/org/apache/camel/test/cdi/CamelCdiDeployment.java
index 1e90d43..1ef1d12 100644
--- a/components/camel-test-cdi/src/main/java/org/apache/camel/test/cdi/CamelCdiDeployment.java
+++ b/components/camel-test-cdi/src/main/java/org/apache/camel/test/cdi/CamelCdiDeployment.java
@@ -38,6 +38,7 @@ final class CamelCdiDeployment implements TestRule {
// TODO: check parallel execution
.containerId("camel-context-cdi")
.property(ConfigurationKey.RELAXED_CONSTRUCTION.get(), true)
+ .property(Weld.SHUTDOWN_HOOK_SYSTEM_PROPERTY, false)
.enableDiscovery()
.beanClasses(test.getJavaClass().getDeclaredClasses())
.addBeanClass(test.getJavaClass())
@@ -49,6 +50,8 @@ final class CamelCdiDeployment implements TestRule {
Beans beans = test.getJavaClass().getAnnotation(Beans.class);
weld.addExtension(new CamelCdiTestExtension(beans));
for (Class<?> alternative : beans.alternatives()) {
+ // It is not necessary to add the alternative class with WELD-2218
+ // anymore, though it's kept for previous versions
weld.addBeanClass(alternative)
.addAlternative(alternative);
}