You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by sh...@apache.org on 2019/07/16 13:39:59 UTC

[trafficserver] branch master updated: In test_hooks Au test case, add work-around for flakeyness of VCONN start/close events.

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

shinrich 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 1611d03  In test_hooks Au test case, add work-around for flakeyness of VCONN start/close events.
1611d03 is described below

commit 1611d03d04e51d4966c6d960130b587781c91098
Author: Walter Karas <wk...@verizonmedia.com>
AuthorDate: Mon Jul 15 16:58:39 2019 -0500

    In test_hooks Au test case, add work-around for flakeyness of VCONN start/close events.
---
 tests/gold_tests/pluginTest/test_hooks/clean.sh      | 20 ++++++++++++++++++++
 .../pluginTest/test_hooks/test_hooks.test.py         |  7 +++++++
 2 files changed, 27 insertions(+)

diff --git a/tests/gold_tests/pluginTest/test_hooks/clean.sh b/tests/gold_tests/pluginTest/test_hooks/clean.sh
new file mode 100644
index 0000000..4159eff
--- /dev/null
+++ b/tests/gold_tests/pluginTest/test_hooks/clean.sh
@@ -0,0 +1,20 @@
+#  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.
+
+while [[ "$(head -n 1 log.txt)" = "Global: event=TS_EVENT_VCONN_START" ]]
+do
+    sed "1,4d" < log.txt > tlog.txt ; rm log.txt ; mv tlog.txt log.txt
+done
diff --git a/tests/gold_tests/pluginTest/test_hooks/test_hooks.test.py b/tests/gold_tests/pluginTest/test_hooks/test_hooks.test.py
index 5871802..a35c87f 100644
--- a/tests/gold_tests/pluginTest/test_hooks/test_hooks.test.py
+++ b/tests/gold_tests/pluginTest/test_hooks/test_hooks.test.py
@@ -78,6 +78,13 @@ tr.Processes.Default.Command = (
 )
 tr.Processes.Default.ReturnCode = 0
 
+# The probing of the ATS port to detect when ATS is ready may be seen by ATS as a VCONN start/close, so filter out these
+# events from the log file.
+#
+tr = Test.AddTestRun()
+tr.Processes.Default.Command = "cd " + Test.RunDirectory + " ; . " + Test.TestDirectory + "/clean.sh"
+tr.Processes.Default.ReturnCode = 0
+
 tr = Test.AddTestRun()
 tr.Processes.Default.Command = "echo check log"
 tr.Processes.Default.ReturnCode = 0