This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.0.x by this push:
new 1bee7a9 Make test more robust
1bee7a9 is described below
commit 1bee7a968bfca47964acdeb3e21db0a5114e14d7
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Jan 12 10:41:51 2022 +0000
Make test more robust
Failure was observed on Travis CI and could be replicated locally in a
debugger using suitable break points.
---
test/org/apache/coyote/http2/TestHttp2Section_3_5.java | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/test/org/apache/coyote/http2/TestHttp2Section_3_5.java
b/test/org/apache/coyote/http2/TestHttp2Section_3_5.java
index e9a9e0e..f43a7eb 100644
--- a/test/org/apache/coyote/http2/TestHttp2Section_3_5.java
+++ b/test/org/apache/coyote/http2/TestHttp2Section_3_5.java
@@ -41,7 +41,18 @@ public class TestHttp2Section_3_5 extends Http2TestBase {
// Send two pings (2*(9+8)=34 bytes) as server looks for entire preface
// of 24 bytes.
sendPing();
- sendPing();
+ // Depending on timing, this ping may fail after the header has been
+ // sent but before the ping body since:
+ // 9 (ping 1 header) + 8 (ping 1 body) + 9 (ping 2 header) = 26 which
+ // which is enough data for the server to determine that the preface is
+ // invalid and close the connection. A subsequent attempt to send ping
2
+ // body will fail.
+ try {
+ sendPing();
+ } catch (IOException e) {
+ e.printStackTrace();
+ // Ignore
+ }
// If the client preface had been valid, this would be an
// acknowledgement. Of the settings. As the preface was invalid, it
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]