Skip to content

Commit

Permalink
refs #29
Browse files Browse the repository at this point in the history
  • Loading branch information
rmpestano committed Aug 28, 2016
1 parent 127eccc commit 1319e2c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ private void init(String unitName) {

}
emf.getCache().evictAll();
em.clear();
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
@ApplicationScoped
public class CdiTestConfig extends CdiConfig {

private EntityManager em;


@Produces
public EntityManager produce() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public void beforeTestExecution(TestExtensionContext testExtensionContext) throw
return;
}

if(isEntityManagerActive()){
em().clear();
}

ConnectionHolder connectionHolder = findTestConnection(testExtensionContext);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void shouldUpdateUser() {
}

@Test
@DataSet(value = "users.yml", transactional = true)//disable constraints because User 1 has one tweet and a follower
@DataSet(value = "users.yml", transactional = true)
@ExpectedDataSet("expectedUser.yml")
public void shouldDeleteUser() {
User user = (User) em().createQuery("select u from User u where u.id = 1").getSingleResult();
Expand Down

0 comments on commit 1319e2c

Please sign in to comment.