Arquillian Warp and CDI in Inspection

Hi currently I am developing a test and I want to use Arquillian Warp. Currently I am using Arquillian 1.1.7, latest Warp and Managed Apache TomEE 1.7.1. The test is as simple as:

public class RestUploadTest {
    public static final WebArchive deployment() {
    	return ShrinkWrap
                .addClasses(BoundedInputStream.class, IOUtil.class,
                    P12Resource.class, TemporaryFolder.class)
                .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
    URL baseUrl;
    public void shouldUploadContent() {
	Warp.initiate(() -> {
            URI endpoint = UriBuilder.fromPath(baseUrl.toExternalForm())
            given().request().body("This is a test file.".getBytes())
                .body("uploadId", notNullValue()).and()
                .body("offset", notNullValue());

	}).inspect(new Inspection() {
                private static final long serialVersionUID = 1L;
                TemporaryFolder temporaryFolder;
                public void assertCreatedFile() {


The problem is that temporaryFolder is not injected and its value is null.
Note that TemporaryFolder is a class that I have developed and injected correctly on my business class (EJB).

Probably I am doing something wrong but I can’t see exactly what.

I’m not 100% sure how this works for TomEE Managed, but for TomEE Embedded I believe they don’t rely on the normal CDI Enricher, but rather somewhere threat the whole TestClass as a Bean. If this behavior is done outside of the TestEnricher SPI in Core then this won’t be called when Warp tries to Enrich the Inspection.

Thanks, yes with embedded I have had a lot of problems so I decided to go to managed/remote. I am going to ask to TomEE forum.

Almost there, I receive this exception:

org.jboss.arquillian.warp.impl.client.execution.WarpSynchronizationException: The Warp failed to observe requests or match them with response.

There were no requests matched by observer [null]

If Warp enriched a wrong request, use observe(…) method to select appropriate request which should be enriched instead.
Otherwise check the server-side log and enable Arquillian debugging mode on both, test and server VM by passing -Darquillian.debug=true.

at org.jboss.arquillian.warp.impl.client.execution.SynchronizationPoint.awaitResponses(
at org.jboss.arquillian.warp.impl.client.execution.DefaultExecutionSynchronizer.waitForResponse(

Do you think it may me something related with TomEE? I mean do I need to set an observer as mandatory?

We are running in an strange problem, same project with same pom and arquilian.xml works on Romain machine but not in mine.

Can anyone test it in his computer? We suspect something related with snapshots but not sure.

Hi alex, “works on my machine”.

C:\projetos\restguide\sources\rest-chunk>mvn -version
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 12:22:22-0300)
Maven home: C:\apache-maven-3.1.1
Java version: 1.8.0_40, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_40\jre
Default locale: pt_BR, platform encoding: Cp1252
OS name: "windows 8.1", version: "6.3", arch: "amd64", family: "dos"
C:\projetos\restguide\sources\rest-chunk>mvn clean test

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.561s
[INFO] Finished at: Wed Mar 25 17:55:58 BRT 2015
[INFO] Final Memory: 33M/282M
[INFO] ------------------------------------------------------------------------

Thank you so much, oh what’s happening on my machine :frowning: well doesn’t matter probably it is something related with maven.

Thanks for your time.

have you tried to run mvn -U clean package?

Hi it was a problem with my company proxy :frowning: no worries :smile:

Can we mark it as solved then? :slight_smile: