Delete accidental call to System.err

This commit is contained in:
Sam Brannen 2014-06-26 14:28:53 +02:00
parent 8ea0d8eea1
commit e73b8b31f8
1 changed files with 4 additions and 5 deletions

View File

@ -167,7 +167,6 @@ public abstract class AbstractContainerEntityManagerFactoryIntegrationTests exte
// public void testAspectJInjectionOfConfigurableEntity() { // public void testAspectJInjectionOfConfigurableEntity() {
// Person p = new Person(); // Person p = new Person();
// System.err.println(p);
// assertNotNull("Was injected", p.getTestBean()); // assertNotNull("Was injected", p.getTestBean());
// assertEquals("Ramnivas", p.getTestBean().getName()); // assertEquals("Ramnivas", p.getTestBean().getName());
// } // }
@ -246,10 +245,10 @@ public abstract class AbstractContainerEntityManagerFactoryIntegrationTests exte
fail("Should have thrown IllegalStateException"); fail("Should have thrown IllegalStateException");
} }
catch (Exception ex) { catch (Exception ex) {
// IllegalStateException expected, but PersistenceException thrown by // We would typically expect an IllegalStateException, but Hibernate throws a
// Hibernate // PersistenceException. So we assert the contents of the exception message
System.err.println(ex); // instead.
assertTrue(ex.getMessage().indexOf("closed") != -1); assertTrue(ex.getMessage().contains("closed"));
} }
q = em.createQuery("select p from Person as p"); q = em.createQuery("select p from Person as p");
q.setFlushMode(FlushModeType.AUTO); q.setFlushMode(FlushModeType.AUTO);