2

I tried to deploy my datasource as follows:

@Deployment(name = "test", order=2)
static WebArchive createDeployment() {
    ShrinkWrap.createFromZipFile(WebArchive, new File("target/test.war")).addAsWebInfResource(new File("src/test/resources/test-DS.xml"), "test-DS.xml")
}

but it seems that my datasource is ignored, I see no info about deployment in jboss console.

Is there any other possibility to deploy datasource with arquillian?

@Deployment(name = "datasource", order=1)
static ? createDSDeployment() {
    ?
}
Łukasz Rzeszotarski
  • 5,791
  • 6
  • 37
  • 68

1 Answers1

2

You could use separate standalone*.xml for arquillian testing and specify your datasource there. For instance, in arquillian.xml:

   <configuration>
       ...
       <property name="serverConfig">standalone-test.xml</property>
       ...
   </configuration>

and datasource can be described in the <datasources> section of that standalone

Vit Ias
  • 725
  • 4
  • 16
  • I tried and I'm getting: WARNING [org.jboss.arquillian.container.impl.MapObject] Configuration contain properties not supported by the backing object org.jboss.as.arquillian.container.embedded.EmbeddedContainerConfiguration Unused property entries: {serverConfig=standalone-test.xml} Supported property names: [managementAddress, modulePath, password, bundlePath, managementPort, jbossHome, managementProtocol, cleanServerBaseDir, username] – Łukasz Rzeszotarski Jun 17 '15 at 11:09
  • I had wrong dependency. embedded instead of managed. wildfly-arquillian-container-managed – Łukasz Rzeszotarski Jun 17 '15 at 14:21