You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Rainer Jung <ra...@kippdata.de> on 2023/05/01 10:32:26 UTC

Unit tests TestAccessLogValve.java

Hi all,

after I added some missing functionality to the JsonAccessLogValve I 
added new tests for the AbstractAccessLogValve and JsonAccessLogValve.

The tests use access log valve classes derived from the two, which write 
their output to a string. The tests check the log lines resulting from 
various access log config patterns against an expected regexp.

Feel free to add more test cases to the parameter list in the test 
class. I added at list one test for each pattern identifier plus for 
common and combined. Every pattern is tested once with the standard 
AccessLogValve and once with the Json one.

It would be nice, if some of you with a more unusual setup could run the 
tests. It shouldn't really matter, whether you run them for TC 8.5, 9, 
10.1 or 11, they are almost the same. If most of you will know, you can 
restartict the tests to the single test class by adding

   test.name=**/TestAccessLogValve.java

to build.properties.

The tests succeed in my environment and now also on the CI environment, 
but it could be, that there are eg. locale or JVM specific subtleties 
that I might have overlooked.

Thanks and regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org