You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "sharanggupta (via GitHub)" <gi...@apache.org> on 2026/10/19 20:37:00 UTC
[PR] Run four tests that were missing @Test [tomcat]
sharanggupta opened a new pull request, #1094:
URL: https://github.com/apache/tomcat/pull/1094
Four test methods have no `@Test`, so they never run. With `@Test` added, each failed until fixed:
- `TestBeanNameELResolver.testGetCommonPropertyType01` and `02`: their Javadoc says "Confirm it returns String.class", but they asserted `null`. `BeanNameELResolver.getCommonPropertyType` always returns `String.class`, so they now assert that.
- `TestSSLValve.testSslCipherUserKeySizeHeaderBadFormat`: d73f69e47 ("Valve now logs non-integer header values") removed its `@Test(expected = NumberFormatException.class)` without adding `@Test`. Run as it was, it failed with a `NullPointerException` in `TesterLogValidationFilter`. The logger still had the filter from `testSslClientCertBadFormat`, which looks for a throwable, and the new warning has none. The test now adds its own filter, as the other tests in the class do, and checks that the warning is logged. `TesterLogValidationFilter` also no longer fails on a record without a throwable when it looks for one; it treats the record as not matching.
- `TestMemoryUserDatabase.testReloadUserDatabase`: it called `open()` inside the try-with-resources block, before the writer was closed, so the file was still empty and parsing failed with "Premature end of file". It also overwrote the file of the database that the other tests share. It now uses its own temporary file and database, like `testDataEscaping`, and reloads after the writer is closed.
`ant test` passes for the three classes, and `ant validate` passes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: [PR] Run four tests that were missing @Test [tomcat]
Posted by "rmaucher (via GitHub)" <gi...@apache.org>.
rmaucher merged PR #1094:
URL: https://github.com/apache/tomcat/pull/1094
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org