[JBoss JIRA] (ARQ-540) Support @ArquillianResource URL for in-container test cases
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-540?page=com.atlassian.jira.plugin.sy... ]
Aslak Knutsen closed ARQ-540.
-----------------------------
> Support @ArquillianResource URL for in-container test cases
> -----------------------------------------------------------
>
> Key: ARQ-540
> URL: https://issues.jboss.org/browse/ARQ-540
> Project: Arquillian
> Issue Type: Enhancement
> Affects Versions: 1.0.0.CR2
> Reporter: Ian Brandt
> Assignee: Aslak Knutsen
> Fix For: 1.1.9.Final
>
>
> From [IRC|http://echelog.matzon.dk/logs/browse/jbosstesting/1312408800]:
> {quote}
> [2:13pm] ianbrandt: aslak, Should @ArquillianResource injection work for in-container test cases? It works fine when I try it for an as-client test, but when I do the same in-container the org.jboss.arquillian.container.test.impl.enricher.resource.URLResourceProvider.protocolMetadata.get() is null, so no context URL. I verified the container is returning a non-null ProtocolMetaData from deploy(...).
> [2:15pm] aslak: ianbrandt, no it currently doesn't work
> [2:16pm] aslak: ianbrandt, it probably should, but i'm not sure we have the info incontianer without doing a callback to the client..
> [2:16pm] aslak: ianbrandt, but then we don't know which deployment we are when incontianer, so we have a little problem there..
> [2:17pm] ianbrandt: aslak, Ah, okay.
> [2:17pm] aslak: no wait we do
> [2:18pm] aslak: the Protocol is executed within a DeploymentScope/ContainerScope, so when it gets the callback, it has the correct context..
> [2:18pm] aslak: we tho need OperatesOnDeployment support for that tho, cuz you possible want to inject URLs not to your self, but to another deployment on possible another contianer that you should invoke from incontainer
> [2:19pm] aslak: so from incontianer on dep 1, we can do @ArqRes @OperatesOnDep("dep2") URL url;
> [2:23pm] ianbrandt: aslak, Makes sense. It's a little more than I could take on at the moment. I was just augmenting the Tomcat tests to show @ArqRes usage. I'll skip it for shouldBeAbleToInvokeServletInDeployedWebApp, and JIRA+Wiki the limitation.
> {quote}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 8 months
[JBoss JIRA] (ARQ-1976) All ResourceProvider#canProvide implementations could try to inject subtypes
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-1976?page=com.atlassian.jira.plugin.s... ]
Aslak Knutsen closed ARQ-1976.
------------------------------
> All ResourceProvider#canProvide implementations could try to inject subtypes
> ----------------------------------------------------------------------------
>
> Key: ARQ-1976
> URL: https://issues.jboss.org/browse/ARQ-1976
> Project: Arquillian
> Issue Type: Bug
> Reporter: Radoslav Husar
> Fix For: 1.1.9.Final
>
>
> Currently the conditions seem to be the other way round as they normally would:
> {noformat}
> @Override
> public boolean canProvide(Class<?> type)
> {
> - return Deployer.class.isAssignableFrom(type);
> + return type.isAssignableFrom(Deployer.class);
> }
> {noformat}
> It does not seem to be intentional. This would not be usually spotted because usually the same class is injected and requested and no provider provides a subtype of other ResourceProvider, so the problem would never occur.
> The resulting exception would look like:
> {noformat}
> java.lang.RuntimeException: Could not set value on field protected ClassA TestClass.field using ClassB@19b89d4,
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 8 months
[JBoss JIRA] (ARQ-1975) Adds ServletContext as Arquillian Resource
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-1975?page=com.atlassian.jira.plugin.s... ]
Aslak Knutsen closed ARQ-1975.
------------------------------
> Adds ServletContext as Arquillian Resource
> ------------------------------------------
>
> Key: ARQ-1975
> URL: https://issues.jboss.org/browse/ARQ-1975
> Project: Arquillian
> Issue Type: Feature Request
> Components: Test Protocol SPIs and Implementation
> Reporter: Alex Soto
> Assignee: Alex Soto
> Fix For: 1.1.9.Final
>
>
> Adds ServletContext as Arquillian Resource so it can be used in the tests. In case of in-container tests, ServletContxt used is the one provided by the Servlet protocol.
> In case of client test, it only works in case of embedded containers and they are the responsible of provide the instance by producing the instance:
> {code:java}
> @Inject
> @ApplicationScoped
> private InstanceProducer<ServletContext> servletContextInstanceProducer;
> servletContextInstanceProducer.set(servletContext);
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 8 months
[JBoss JIRA] (ARQ-540) Support @ArquillianResource URL for in-container test cases
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-540?page=com.atlassian.jira.plugin.sy... ]
Aslak Knutsen resolved ARQ-540.
-------------------------------
Fix Version/s: 1.1.9.Final
(was: 2.0.0.Beta1)
Assignee: Aslak Knutsen
Resolution: Done
pushed upstream https://github.com/arquillian/arquillian-core/commit/a6aae69ba50e23381341...
> Support @ArquillianResource URL for in-container test cases
> -----------------------------------------------------------
>
> Key: ARQ-540
> URL: https://issues.jboss.org/browse/ARQ-540
> Project: Arquillian
> Issue Type: Enhancement
> Affects Versions: 1.0.0.CR2
> Reporter: Ian Brandt
> Assignee: Aslak Knutsen
> Fix For: 1.1.9.Final
>
>
> From [IRC|http://echelog.matzon.dk/logs/browse/jbosstesting/1312408800]:
> {quote}
> [2:13pm] ianbrandt: aslak, Should @ArquillianResource injection work for in-container test cases? It works fine when I try it for an as-client test, but when I do the same in-container the org.jboss.arquillian.container.test.impl.enricher.resource.URLResourceProvider.protocolMetadata.get() is null, so no context URL. I verified the container is returning a non-null ProtocolMetaData from deploy(...).
> [2:15pm] aslak: ianbrandt, no it currently doesn't work
> [2:16pm] aslak: ianbrandt, it probably should, but i'm not sure we have the info incontianer without doing a callback to the client..
> [2:16pm] aslak: ianbrandt, but then we don't know which deployment we are when incontianer, so we have a little problem there..
> [2:17pm] ianbrandt: aslak, Ah, okay.
> [2:17pm] aslak: no wait we do
> [2:18pm] aslak: the Protocol is executed within a DeploymentScope/ContainerScope, so when it gets the callback, it has the correct context..
> [2:18pm] aslak: we tho need OperatesOnDeployment support for that tho, cuz you possible want to inject URLs not to your self, but to another deployment on possible another contianer that you should invoke from incontainer
> [2:19pm] aslak: so from incontianer on dep 1, we can do @ArqRes @OperatesOnDep("dep2") URL url;
> [2:23pm] ianbrandt: aslak, Makes sense. It's a little more than I could take on at the moment. I was just augmenting the Tomcat tests to show @ArqRes usage. I'll skip it for shouldBeAbleToInvokeServletInDeployedWebApp, and JIRA+Wiki the limitation.
> {quote}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 8 months
[JBoss JIRA] (ARQ-1978) Allow Containers to register HTTPSContexts in ProtocolMetadata
by Aslak Knutsen (JIRA)
Aslak Knutsen created ARQ-1978:
----------------------------------
Summary: Allow Containers to register HTTPSContexts in ProtocolMetadata
Key: ARQ-1978
URL: https://issues.jboss.org/browse/ARQ-1978
Project: Arquillian
Issue Type: Feature Request
Components: Test Protocol SPIs and Implementation
Affects Versions: 1.1.8.Final
Reporter: Aslak Knutsen
Assignee: Aslak Knutsen
Fix For: 1.1.9.Final
During Deployment a Container should be able to register httpS and http Context objects via the ProtocolMetadata. This would allow Arquillian to automatically fetch the configured https port.
This would open for only defining the schema to use in the ServletProtocolConfiguration if you wanted to use httpS communication; https://issues.jboss.org/browse/ARQ-1977
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 8 months