Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update APE example to Alpha7. #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions jpa-persistence-extension/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<description>Examples that demonstrate how to test JPA to read and write a database using Arquillian together with Persistence Extension</description>

<properties>
<version.arquillian_persistence>1.0.0.Alpha5</version.arquillian_persistence>
<version.arquillian_persistence>1.0.0.Alpha7</version.arquillian_persistence>
<version.fest_assert>1.4</version.fest_assert>
<version.commons_lang>2.5</version.commons_lang>
</properties>
Expand All @@ -38,15 +38,19 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.arquillian.protocol</groupId>
<artifactId>arquillian-protocol-servlet</artifactId>
<scope>test</scope>
</dependency>

<dependency>
Expand All @@ -58,14 +62,7 @@

<dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-persistence-api</artifactId>
<version>${version.arquillian_persistence}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-persistence-impl</artifactId>
<artifactId>arquillian-persistence-dbunit</artifactId>
<version>${version.arquillian_persistence}</version>
<scope>test</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.acme.jpa;

import static org.fest.assertions.Assertions.assertThat;
import static org.jboss.arquillian.transaction.api.annotation.TransactionMode.*;

import java.math.BigDecimal;
import java.util.List;
Expand All @@ -11,11 +12,8 @@
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.junit.InSequence;
import org.jboss.arquillian.persistence.Cleanup;
import org.jboss.arquillian.persistence.ShouldMatchDataSet;
import org.jboss.arquillian.persistence.TestExecutionPhase;
import org.jboss.arquillian.persistence.TransactionMode;
import org.jboss.arquillian.persistence.Transactional;
import org.jboss.arquillian.transaction.api.annotation.Transactional;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
Expand All @@ -40,7 +38,7 @@ public static Archive<?> createDeployment() {
EntityManager em;

@Test @InSequence(1)
@Transactional(TransactionMode.ROLLBACK)
@Transactional(ROLLBACK)
public void shouldPersistsPcGames() throws Exception {
// given
Game batman = new Game("Batman Arkham Asylum", 2009,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

<defaultProtocol type="Servlet 3.0" />

<!-- Uncomment to have test archives exported to the file system for inspection -->
<!-- <engine> <property name="deploymentExportPath">target</property> </engine> -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

<defaultProtocol type="Servlet 3.0" />
<!-- Uncomment to have test archives exported to the file system for inspection -->
<!-- <engine> <property name="deploymentExportPath">target</property> </engine> -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

<defaultProtocol type="Servlet 3.0" />
<!-- Uncomment to have test archives exported to the file system for inspection -->
<!-- <engine> <property name="deploymentExportPath">target</property> </engine> -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

<defaultProtocol type="Servlet 3.0" />
<!-- Uncomment to have test archives exported to the file system for inspection -->
<!-- <engine> <property name="deploymentExportPath">target</property> </engine> -->

Expand All @@ -14,13 +15,19 @@

<extension qualifier="persistence">
<property name="defaultDataSource">java:jboss/datasources/ExampleDS</property>
<property name="scriptsToExecuteBeforeTest">SET REFERENTIAL_INTEGRITY FALSE;</property>
<property name="userTransactionJndi">java:jboss/UserTransaction</property>
<!-- Uncomment these properties if you want to see database content during test execution -->
<!--
<property name="dumpData">true</property>
<property name="dumpDirectory">/tmp/showcase</property>
-->
</extension>

<extension qualifier="persistence-script">
<property name="scriptsToExecuteBeforeTest">SET REFERENTIAL_INTEGRITY FALSE;</property>
</extension>

<extension qualifier="transaction">
<property name="userTransactionJndi">java:jboss/UserTransaction</property>
</extension>

</arquillian>
4 changes: 2 additions & 2 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.arquillian_core>1.0.1.Final</version.arquillian_core>
<version.arquillian_container_glassfish>1.0.0.CR3</version.arquillian_container_glassfish>
<version.arquillian_container_glassfish>1.0.0.CR4</version.arquillian_container_glassfish>
<version.arquillian_container_openwebbeans>1.0.0.CR2</version.arquillian_container_openwebbeans>
<version.arquillian_container_jbossas>1.0.0.CR2</version.arquillian_container_jbossas>
<version.arquillian_container_weld>1.0.0.CR2</version.arquillian_container_weld>
Expand Down Expand Up @@ -489,7 +489,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<version>2.17</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down