On Mon, Dec 2, 2024 at 1:03 PM <[email protected]> wrote:
>
> This is an automated email from the ASF dual-hosted git repository.
>
> markt pushed a commit to branch main
> in repository https://gitbox.apache.org/repos/asf/tomcat.git
>
>
> The following commit(s) were added to refs/heads/main by this push:
> new 537adeb861 Try and fix CI failures
> 537adeb861 is described below
>
> commit 537adeb861e06ec582db67c7a9e42f43a971efda
> Author: Mark Thomas <[email protected]>
> AuthorDate: Mon Dec 2 12:02:40 2024 +0000
>
> Try and fix CI failures
Good catch. Actually I can see the regular access log tests have the
same trick..
Rémy
> ---
> .../catalina/valves/TestJDBCAccessLogValve.java | 19
> +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/test/org/apache/catalina/valves/TestJDBCAccessLogValve.java
> b/test/org/apache/catalina/valves/TestJDBCAccessLogValve.java
> index 4ad96eb661..518faa52e9 100644
> --- a/test/org/apache/catalina/valves/TestJDBCAccessLogValve.java
> +++ b/test/org/apache/catalina/valves/TestJDBCAccessLogValve.java
> @@ -107,6 +107,25 @@ public class TestJDBCAccessLogValve extends
> TomcatBaseTest {
> }
>
> public void verify() throws Exception {
> + /*
> + * The access log is written after the response. The client may
> have processed the response faster than the
> + * server was able to write the access log. Give the server up
> to 5 seconds to write the access log.
> + */
> + int rowCount = 0;
> + int timerCount = 0;
> + while (timerCount < 500) {
> + try (Statement statement = conn.createStatement()) {
> + statement.execute("SELECT COUNT(*) FROM access");
> + ResultSet rs = statement.getResultSet();
> + Assert.assertTrue(rs.next());
> + rowCount = rs.getInt(1);
> + if (rowCount > 1) {
> + break;
> + }
> + Thread.sleep(10);
> + timerCount++;
> + }
> + }
> try (Statement statement = conn.createStatement()) {
> statement.execute("SELECT * FROM access");
> ResultSet rs = statement.getResultSet();
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]