This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
     new 6dff6f36f9 Back-port additional test from 9.0.x
6dff6f36f9 is described below

commit 6dff6f36f9864632539148683beb6e2aca8e2985
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Aug 8 16:44:32 2023 +0100

    Back-port additional test from 9.0.x
---
 .../coyote/http2/TestHttp2ConnectionTimeouts.java  | 37 ++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/test/org/apache/coyote/http2/TestHttp2ConnectionTimeouts.java 
b/test/org/apache/coyote/http2/TestHttp2ConnectionTimeouts.java
new file mode 100644
index 0000000000..c18fa3b1b6
--- /dev/null
+++ b/test/org/apache/coyote/http2/TestHttp2ConnectionTimeouts.java
@@ -0,0 +1,37 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.coyote.http2;
+
+import org.junit.Test;
+
+public class TestHttp2ConnectionTimeouts extends Http2TestBase {
+
+    @Test
+    public void testConnectionTimeout() throws Exception {
+
+        // Reduce default timeouts so test completes sooner
+        enableHttp2(200, false, 5000, 5000, 10000, 5000, 5000);
+        configureAndStartWebApplication();
+        openClientConnection(false);
+        doHttpUpgrade();
+        sendClientPreface();
+        validateHttp2InitialResponse();
+
+        // Wait for timeout - should receive GoAway frame
+        handleGoAwayResponse(1, Http2Error.NO_ERROR);
+    }
+}


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

Reply via email to