From e73b8b31f86908aff2ffbcd6d89d01c78aac7a0e Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Thu, 26 Jun 2014 14:28:53 +0200 Subject: [PATCH] Delete accidental call to System.err --- ...actContainerEntityManagerFactoryIntegrationTests.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/AbstractContainerEntityManagerFactoryIntegrationTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/AbstractContainerEntityManagerFactoryIntegrationTests.java index 9c8c13be35c..5f01f4101ee 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/AbstractContainerEntityManagerFactoryIntegrationTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/AbstractContainerEntityManagerFactoryIntegrationTests.java @@ -167,7 +167,6 @@ public abstract class AbstractContainerEntityManagerFactoryIntegrationTests exte // public void testAspectJInjectionOfConfigurableEntity() { // Person p = new Person(); - // System.err.println(p); // assertNotNull("Was injected", p.getTestBean()); // assertEquals("Ramnivas", p.getTestBean().getName()); // } @@ -246,10 +245,10 @@ public abstract class AbstractContainerEntityManagerFactoryIntegrationTests exte fail("Should have thrown IllegalStateException"); } catch (Exception ex) { - // IllegalStateException expected, but PersistenceException thrown by - // Hibernate - System.err.println(ex); - assertTrue(ex.getMessage().indexOf("closed") != -1); + // We would typically expect an IllegalStateException, but Hibernate throws a + // PersistenceException. So we assert the contents of the exception message + // instead. + assertTrue(ex.getMessage().contains("closed")); } q = em.createQuery("select p from Person as p"); q.setFlushMode(FlushModeType.AUTO);