deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwellm...@apache.org
Subject [1/2] deltaspike git commit: DELTASPIKE-1052 make test pass on GlassFish
Date Wed, 30 Dec 2015 11:18:26 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 6d75f5ea9 -> 5555507fe


DELTASPIKE-1052 make test pass on GlassFish

Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/a7573a78
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/a7573a78
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/a7573a78

Branch: refs/heads/master
Commit: a7573a78e138eca6440575f2931bde347b600822
Parents: 6d75f5e
Author: Harald Wellmann <hwellmann@apache.org>
Authored: Wed Dec 30 12:18:01 2015 +0100
Committer: Harald Wellmann <hwellmann@apache.org>
Committed: Wed Dec 30 12:18:01 2015 +0100

----------------------------------------------------------------------
 .../deltaspike/data/test/ee7/graph/HouseRepositoryTest.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/a7573a78/deltaspike/modules/data/test-ee7/src/test/java/org/apache/deltaspike/data/test/ee7/graph/HouseRepositoryTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/data/test-ee7/src/test/java/org/apache/deltaspike/data/test/ee7/graph/HouseRepositoryTest.java
b/deltaspike/modules/data/test-ee7/src/test/java/org/apache/deltaspike/data/test/ee7/graph/HouseRepositoryTest.java
index 37d619f..73a3d18 100644
--- a/deltaspike/modules/data/test-ee7/src/test/java/org/apache/deltaspike/data/test/ee7/graph/HouseRepositoryTest.java
+++ b/deltaspike/modules/data/test-ee7/src/test/java/org/apache/deltaspike/data/test/ee7/graph/HouseRepositoryTest.java
@@ -174,9 +174,11 @@ public class HouseRepositoryTest
     public void init() throws Exception
     {
         puu = entityManager.getEntityManagerFactory().getPersistenceUnitUtil();
-        tx.begin();
+
+        // TODO this causes a tx rollback on GlassFish 4 when run in a UserTransaction
         if (repository.count() == 0)
         {
+            tx.begin();
             House house = new House();
             Flat flat1 = new Flat();
             flat1.setName("Flat 1");
@@ -213,7 +215,7 @@ public class HouseRepositoryTest
             house.setGarages(Arrays.asList(garageA, garageB));
 
             entityManager.persist(house);
+            tx.commit();
         }
-        tx.commit();
     }
 }


Mime
View raw message