From 2d2abd7f88a892f3002215e0687c4d2a5d4baac5 Mon Sep 17 00:00:00 2001 From: Peter Butkovic Date: Tue, 27 Aug 2013 11:33:41 +0200 Subject: [PATCH 1/2] migrated to the latest arquillian and the latest glassfish --- .../{sun-resources.xml => glassfish-resources.xml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename xa/src/test/resources-glassfish-embedded/{sun-resources.xml => glassfish-resources.xml} (100%) diff --git a/xa/src/test/resources-glassfish-embedded/sun-resources.xml b/xa/src/test/resources-glassfish-embedded/glassfish-resources.xml similarity index 100% rename from xa/src/test/resources-glassfish-embedded/sun-resources.xml rename to xa/src/test/resources-glassfish-embedded/glassfish-resources.xml From bee1b1c4243dead2cf26a40bead6cef5cfb8ef75 Mon Sep 17 00:00:00 2001 From: Peter Butkovic Date: Tue, 27 Aug 2013 11:37:08 +0200 Subject: [PATCH 2/2] migrated to the latest arquillian and the latest glassfish --- xa/pom.xml | 70 +++++++------------ .../com/acme/jpa/TwoPhaseCommitTestCase.java | 7 +- xa/src/test/resources/arquillian.xml | 30 ++++---- 3 files changed, 47 insertions(+), 60 deletions(-) diff --git a/xa/pom.xml b/xa/pom.xml index 575ba31..3601988 100644 --- a/xa/pom.xml +++ b/xa/pom.xml @@ -15,37 +15,19 @@ UTF-8 yyyyMMdd'T'HHmmss - 1.0.0.Alpha5 - - - jboss-public-repository - JBoss Repository - http://repository.jboss.org/nexus/content/groups/public - - never - - - false - - - - - - - jboss-public-repository - JBoss Repository - http://repository.jboss.org/nexus/content/groups/public - - never - - - false - - - - + + + + org.jboss.arquillian + arquillian-bom + 1.1.1.Final + import + pom + + + @@ -70,9 +52,8 @@ - org.jboss.arquillian - arquillian-junit - ${arquillian.version} + org.jboss.arquillian.junit + arquillian-junit-container test @@ -132,10 +113,8 @@ - org.apache.maven.plugins maven-surefire-plugin - - 2.4.3 + 2.12 **/*TestCase.java @@ -160,16 +139,17 @@ org.jboss.arquillian.container - arquillian-glassfish-embedded-3 - ${arquillian.version} - test - - - org.glassfish.extras - glassfish-embedded-all - 3.0.1 - provided - + arquillian-glassfish-embedded-3.1 + 1.0.0.CR3 + test + + + org.glassfish.main.extras + glassfish-embedded-all + 3.1.2 + provided + + org.hibernate diff --git a/xa/src/test/java/com/acme/jpa/TwoPhaseCommitTestCase.java b/xa/src/test/java/com/acme/jpa/TwoPhaseCommitTestCase.java index 864d61e..e3f0a67 100644 --- a/xa/src/test/java/com/acme/jpa/TwoPhaseCommitTestCase.java +++ b/xa/src/test/java/com/acme/jpa/TwoPhaseCommitTestCase.java @@ -17,10 +17,11 @@ package com.acme.jpa; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; import javax.ejb.EJB; -import org.jboss.arquillian.api.Deployment; +import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.junit.Arquillian; import org.jboss.shrinkwrap.api.Archive; import org.jboss.shrinkwrap.api.ShrinkWrap; @@ -36,7 +37,7 @@ public static Archive createDeployment() { return ShrinkWrap.create(WebArchive.class, "test.war") .addPackage(Game.class.getPackage()) - .addManifestResource("test-persistence.xml", "persistence.xml"); + .addAsResource("test-persistence.xml", "META-INF/persistence.xml"); } @EJB @@ -55,6 +56,7 @@ public void should_not_modify_database_transaction_fails() try { service.succeedFirstFailSecondInTx(); + fail(); } catch (Exception e) { @@ -72,6 +74,7 @@ public void should_modify_database_if_no_transaction() throws Exception try { service.succeedFirstFailSecondWithoutTx(); + fail(); } catch (Exception e) { diff --git a/xa/src/test/resources/arquillian.xml b/xa/src/test/resources/arquillian.xml index 6072f50..0a4d246 100644 --- a/xa/src/test/resources/arquillian.xml +++ b/xa/src/test/resources/arquillian.xml @@ -1,17 +1,21 @@ - + - - + + - - src/test/resources-glassfish-embedded/sun-resources.xml - + + jdbc/a + - + + + + 7070 + src/test/resources-glassfish-embedded/glassfish-resources.xml + + + + \ No newline at end of file