Browse Source

Clean up console output for spring-beans tests

pull/219/merge
Chris Beams 12 years ago
parent
commit
3100d89d07
  1. 1
      spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java
  2. 3
      spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java
  3. 12
      spring-beans/src/test/resources/log4j.xml

1
spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java

@ -591,7 +591,6 @@ public class DefaultListableBeanFactoryTests { @@ -591,7 +591,6 @@ public class DefaultListableBeanFactoryTests {
fail("Should throw exception on invalid property");
}
catch (BeanCreationException ex) {
ex.printStackTrace();
assertTrue(ex.getCause() instanceof NotWritablePropertyException);
NotWritablePropertyException cause = (NotWritablePropertyException) ex.getCause();
// expected

3
spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java

@ -29,7 +29,6 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; @@ -29,7 +29,6 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.core.io.Resource;
import org.springframework.tests.sample.beans.TestBean;
/**
* @author Rob Harrop
* @author Chris Beams
@ -78,7 +77,6 @@ public final class CustomProblemReporterTests { @@ -78,7 +77,6 @@ public final class CustomProblemReporterTests {
@Override
public void error(Problem problem) {
System.out.println(problem);
this.errors.add(problem);
}
@ -88,7 +86,6 @@ public final class CustomProblemReporterTests { @@ -88,7 +86,6 @@ public final class CustomProblemReporterTests {
@Override
public void warning(Problem problem) {
System.out.println(problem);
this.warnings.add(problem);
}
}

12
spring-beans/src/test/resources/log4j.xml

@ -11,21 +11,13 @@ @@ -11,21 +11,13 @@
</layout>
</appender>
<logger name="org.springframework.beans">
<level value="warn" />
</logger>
<logger name="org.springframework.binding">
<level value="debug" />
</logger>
<logger name="org.springframework.core.GenericTypeResolver">
<logger name="org.springframework.beans.factory.config.DeprecatedBeanWarnerTests$MyDeprecatedBeanWarner">
<level value="warn" />
</logger>
<!-- Root Logger -->
<root>
<priority value="warn" />
<priority value="error" />
<appender-ref ref="console" />
</root>

Loading…
Cancel
Save