[trafficserver] branch master updated (4a3c1b0 -> a98e2e4)

2020-04-30 Thread bcall
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from 4a3c1b0  Au test: HTTP/2 client sends POST, server delays 2 minutes, 
sends 200 KB.
 add a98e2e4  gcc10: fixed warning about returning local variable in 
int64_to_str()

No new revisions were added by this update.

Summary of changes:
 src/tscore/ink_hrtime.cc | 38 --
 1 file changed, 20 insertions(+), 18 deletions(-)



[trafficserver] branch master updated: Au test: HTTP/2 client sends POST, server delays 2 minutes, sends 200 KB.

2020-04-30 Thread rrm
This is an automated email from the ASF dual-hosted git repository.

rrm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 4a3c1b0  Au test: HTTP/2 client sends POST, server delays 2 minutes, 
sends 200 KB.
4a3c1b0 is described below

commit 4a3c1b062f3cf843fbe3754ea175951a7bf2c2a8
Author: Walter Karas 
AuthorDate: Wed Apr 29 11:34:43 2020 -0500

Au test: HTTP/2 client sends POST, server delays 2 minutes, sends 200 KB.

Test is skipped by default for CI because of long delay.
---
 tests/gold_tests/post_slow_server/check.sh | 19 ++
 .../post_slow_server/post_slow_server.test.py  | 75 ++
 tests/gold_tests/post_slow_server/server.sh| 50 +++
 tests/gold_tests/post_slow_server/ssl/server.key   | 15 +
 tests/gold_tests/post_slow_server/ssl/server.pem   | 32 +
 5 files changed, 191 insertions(+)

diff --git a/tests/gold_tests/post_slow_server/check.sh 
b/tests/gold_tests/post_slow_server/check.sh
new file mode 100755
index 000..73220b0
--- /dev/null
+++ b/tests/gold_tests/post_slow_server/check.sh
@@ -0,0 +1,19 @@
+#  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.
+
+# Check that curl command received 200 KBytes of data (in 8-byte lines).
+
+(( $( grep '^1234567$' curl.log | wc -l ) == ((200 * 1024) / 8) ))
diff --git a/tests/gold_tests/post_slow_server/post_slow_server.test.py 
b/tests/gold_tests/post_slow_server/post_slow_server.test.py
new file mode 100644
index 000..8d12ee4
--- /dev/null
+++ b/tests/gold_tests/post_slow_server/post_slow_server.test.py
@@ -0,0 +1,75 @@
+'''
+Server receives POST, sent by client over HTTP/2, waits 2 minutes, then sends 
response with 200 KBytes of data
+'''
+#  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.
+
+Test.Summary = '''
+Server receives POST, sent by client over HTTP/2, waits 2 minutes, then sends 
response with 200 KBytes of data
+'''
+
+# Because of the 2 minute delay, we don't want to run this test in CI checks.  
Comment out this line to run it.
+Test.SkipIf(Condition.true("Test takes too long to run it in CI."))
+
+Test.SkipUnless(
+Condition.HasCurlFeature('http2')
+)
+
+ts = Test.MakeATSProcess("ts", enable_tls=True)
+
+ts.addSSLfile("ssl/server.pem")
+ts.addSSLfile("ssl/server.key")
+
+ts.Disk.records_config.update({
+'proxy.config.diags.debug.enabled': 1,
+'proxy.config.diags.debug.tags': 'http',
+'proxy.config.http.cache.http': 0,  # disable caching.
+'proxy.config.proxy_name': 'Poxy_Proxy',  # This will be the server name.
+'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir),
+'proxy.config.ssl.server.private_key.path': 
'{0}'.format(ts.Variables.SSLDir),
+'proxy.config.http.transaction_no_activity_timeout_out': 150,
+'proxy.config.http2.no_activity_timeout_in': 150,
+})
+
+ts.Disk.ssl_multicert_config.AddLine(
+'dest_ip=* ssl_cert_name=server.pem ssl_key_name=server.key'
+)
+
+Test.GetTcpPort("server_port")
+
+ts.Disk.remap_config.AddLine(
+'map https://localhost 
http://localhost:{}'.format(Test.Variables.server_port)
+)
+
+server = Test.Processes.Process(
+"server", "bash -c '" + Test.TestDirectory + "/server.sh 
{}'".format(Test.Variables.server_port)
+)
+
+tr = Test.AddTestRun()
+tr.Processes.Default.Command = (
+'curl --request POST --verbose --ipv4 --http2 --insecure