Author: kkolinko Date: Fri Oct 31 11:28:44 2014 New Revision: 1635751 URL: http://svn.apache.org/r1635751 Log: Log the current test name when the test starts. It makes reading the log files easier.
Merged r1634690 from tomcat/trunk. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/LoggingBaseTest.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ ------------------------------------------------------------------------------ Merged /tomcat/trunk:r1634690 Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/LoggingBaseTest.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/LoggingBaseTest.java?rev=1635751&r1=1635750&r2=1635751&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/LoggingBaseTest.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/LoggingBaseTest.java Fri Oct 31 11:28:44 2014 @@ -24,6 +24,8 @@ import static org.junit.Assert.fail; import org.junit.After; import org.junit.Before; +import org.junit.Rule; +import org.junit.rules.TestName; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; @@ -50,6 +52,12 @@ public abstract class LoggingBaseTest { private List<File> deleteOnTearDown = new ArrayList<File>(); /** + * Provides name of the currently executing test method. + */ + @Rule + public final TestName testName = new TestName(); + + /** * Helper method that returns the directory where Tomcat build resides. It * is used to access resources that are part of default Tomcat deployment. * E.g. the examples webapp. @@ -104,6 +112,7 @@ public abstract class LoggingBaseTest { // Get log instance after logging has been configured log = LogFactory.getLog(getClass()); + log.info("Starting test case [" + testName.getMethodName() + "]"); } @After Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1635751&r1=1635750&r2=1635751&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Oct 31 11:28:44 2014 @@ -224,6 +224,10 @@ pick up the Windows binaries that are based on OpenSSL 1.0.1j and APR 1.5.1. (markt) </update> + <scode> + In Tomcat tests: log name of the current test method at start time. + (kkolinko) + </scode> </changelog> </subsection> </section> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org