This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new 7d2a6333d7 Fix BZ 63390 - Fix test on Solaris.
7d2a6333d7 is described below
commit 7d2a6333d70cbafab93019372fe5cb69538cd1da
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Dec 21 15:45:43 2022 +0000
Fix BZ 63390 - Fix test on Solaris.
The first server write after a client close doesn't always trigger an
exception on Solaris. Use additional writes to trigger an exception so
the test passes.
---
test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java
b/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java
index 0db6faa900..0609eb05b6 100644
--- a/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java
+++ b/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java
@@ -1676,7 +1676,13 @@ public class TestNonBlockingAPI extends TomcatBaseTest {
sos.print("TEST");
stage.incrementAndGet();
} else if (stage.get() == 2) {
+ // This should trigger an error as the client closed
the
+ // socket
sos.flush();
+ // Additional writes are required to trigger the error
+ // on solaris
+ sos.print("MORE");
+ log.info("Additional server write after client close
to trigger exception");
}
} while (sos.isReady());
} catch (IOException ioe) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]