[JBoss JIRA] (ARQ-1880) Arquillian core relies on TCCL to load infra
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-1880?page=com.atlassian.jira.plugin.s... ]
Aslak Knutsen resolved ARQ-1880.
--------------------------------
Resolution: Done
pushed upstream https://github.com/arquillian/arquillian-core/commit/f0036995df93e0464aa0...
> Arquillian core relies on TCCL to load infra
> --------------------------------------------
>
> Key: ARQ-1880
> URL: https://issues.jboss.org/browse/ARQ-1880
> Project: Arquillian
> Issue Type: Bug
> Affects Versions: 1.1.2.Final
> Reporter: Thomas Diesler
> Assignee: Thomas Diesler
> Fix For: 1.1.7.Final
>
>
> While testing FSW product stuff it turns out that test code is executed with a TCCL from the ARQ bundle. If ARQ does not set a TCCL we get
> {code}
> Caused by: java.lang.ClassNotFoundException: org/jboss/arquillian/test/impl/EventTestRunnerAdaptor
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:270)
> at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:105)
> at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:97)
> at org.jboss.arquillian.test.spi.TestRunnerAdaptorBuilder.build(TestRunnerAdaptorBuilder.java:52)
> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:93)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
> at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:65)
> at org.jboss.arquillian.osgi.JUnitBundleTestRunner.execute(JUnitBundleTestRunner.java:34)
> {code}
> Having a TCCL set is highly problematic in OSGi because it bypasses al user defined wiring rules. When test code calls into API that uses TCCL, that API will try to load types from the ARQ Bundle classloader, which of course has no visibility to the requested types/resources.
> The ARQ infra should ideally not have to depend on TCCL for loading its own types. Second best would be to reset the TCCL after all infra stuff is done and before the call into the test case.
> The TCCL association is part of the public API. From the perspective of the test case, it needs to be defined and ideally be guaranteed to be null.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 10 months
[JBoss JIRA] (ARQ-1880) Arquillian core relies on TCCL to load infra
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-1880?page=com.atlassian.jira.plugin.s... ]
Aslak Knutsen updated ARQ-1880:
-------------------------------
Fix Version/s: 1.1.7.Final
> Arquillian core relies on TCCL to load infra
> --------------------------------------------
>
> Key: ARQ-1880
> URL: https://issues.jboss.org/browse/ARQ-1880
> Project: Arquillian
> Issue Type: Bug
> Affects Versions: 1.1.2.Final
> Reporter: Thomas Diesler
> Assignee: Thomas Diesler
> Fix For: 1.1.7.Final
>
>
> While testing FSW product stuff it turns out that test code is executed with a TCCL from the ARQ bundle. If ARQ does not set a TCCL we get
> {code}
> Caused by: java.lang.ClassNotFoundException: org/jboss/arquillian/test/impl/EventTestRunnerAdaptor
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:270)
> at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:105)
> at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:97)
> at org.jboss.arquillian.test.spi.TestRunnerAdaptorBuilder.build(TestRunnerAdaptorBuilder.java:52)
> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:93)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
> at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:65)
> at org.jboss.arquillian.osgi.JUnitBundleTestRunner.execute(JUnitBundleTestRunner.java:34)
> {code}
> Having a TCCL set is highly problematic in OSGi because it bypasses al user defined wiring rules. When test code calls into API that uses TCCL, that API will try to load types from the ARQ Bundle classloader, which of course has no visibility to the requested types/resources.
> The ARQ infra should ideally not have to depend on TCCL for loading its own types. Second best would be to reset the TCCL after all infra stuff is done and before the call into the test case.
> The TCCL association is part of the public API. From the perspective of the test case, it needs to be defined and ideally be guaranteed to be null.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 10 months
[JBoss JIRA] (ARQ-1856) Remove dynamic import from arquillian-bundle
by Thomas Diesler (JIRA)
[ https://issues.jboss.org/browse/ARQ-1856?page=com.atlassian.jira.plugin.s... ]
Thomas Diesler updated ARQ-1856:
--------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
Done
> Remove dynamic import from arquillian-bundle
> --------------------------------------------
>
> Key: ARQ-1856
> URL: https://issues.jboss.org/browse/ARQ-1856
> Project: Arquillian
> Issue Type: Feature Request
> Components: OSGi Containers
> Reporter: Thomas Diesler
> Assignee: Thomas Diesler
> Fix For: osgi_2.0.0.Final
>
>
> Currently, the arquillian bundle contains a dynamic import "*" which may lead to undesired package wiring. Theoretically, it should possible to embed all required dependencies in the arq-bundle and load the test classes from the test-bundle(s) via Bundle.loadClass(...)
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 10 months