You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2021/09/29 22:55:08 UTC

[trafficserver] branch 9.2.x updated: Stabilize regex_revalidate Au test. (#559) (#8360)

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

zwoop pushed a commit to branch 9.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.2.x by this push:
     new 8654348  Stabilize regex_revalidate Au test. (#559) (#8360)
8654348 is described below

commit 865434862ea679fdcf6e13d001877363764f941c
Author: Walt Karas <wk...@verizonmedia.com>
AuthorDate: Mon Sep 27 18:50:39 2021 -0500

    Stabilize regex_revalidate Au test. (#559) (#8360)
    
    Delay sufficiently between writes of config file so the differences in the write times will be greater
    than the granualirity of the timestamp used by the plugin.
    
    (cherry picked from commit 9031965889ab430bd182dd5485ecda451ecb6a8a)
    (cherry picked from commit 1a353b23106fed9de98c8d4b0e0bbdc751337606)
---
 .../pluginTest/regex_revalidate/regex_revalidate.test.py   | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/tests/gold_tests/pluginTest/regex_revalidate/regex_revalidate.test.py b/tests/gold_tests/pluginTest/regex_revalidate/regex_revalidate.test.py
index cd3b581..73e4b50 100644
--- a/tests/gold_tests/pluginTest/regex_revalidate/regex_revalidate.test.py
+++ b/tests/gold_tests/pluginTest/regex_revalidate/regex_revalidate.test.py
@@ -147,7 +147,7 @@ ts.Disk.remap_config.AddLine(
 # minimal configuration
 ts.Disk.records_config.update({
     'proxy.config.diags.debug.enabled': 1,
-    'proxy.config.diags.debug.tags': 'regex_revalidate',
+    'proxy.config.diags.debug.tags': 'http|regex_revalidate',
     #    'proxy.config.diags.debug.enabled': 0,
     'proxy.config.http.insert_age_in_response': 0,
     'proxy.config.http.response_via_str': 3,
@@ -185,6 +185,10 @@ tr.StillRunningAfter = ts
 
 # 4 Stage - Reload new regex_revalidate
 tr = Test.AddTestRun("Reload config add path1")
+# Need a sufficient delay so that the modification time difference of the new config file versus
+# the old is greater than the granularity of the time stamp used.  (The config file write
+# happens after the delay.)
+tr.DelayStart = 1
 tr.Disk.File(regex_revalidate_conf_path, typename="ats:config").AddLines([
     path1_rule
 ])
@@ -214,6 +218,10 @@ tr.StillRunningAfter = ts
 
 # 7 Stage - Reload new regex_revalidate
 tr = Test.AddTestRun("Reload config add path2")
+# Need a sufficient delay so that the modification time difference of the new config file versus
+# the old is greater than the granularity of the time stamp used.  (The config file write
+# happens after the delay.)
+tr.DelayStart = 1
 tr.Disk.File(regex_revalidate_conf_path, typename="ats:config").AddLines([
     path1_rule,
     'path2 {}\n'.format(int(time.time()) + 700)
@@ -247,6 +255,10 @@ tr.StillRunningAfter = ts
 
 # 10 Stage - regex_revalidate rewrite rule early expire
 tr = Test.AddTestRun("Reload config change path2")
+# Need a sufficient delay so that the modification time difference of the new config file versus
+# the old is greater than the granularity of the time stamp used.  (The config file write
+# happens after the delay.)
+tr.DelayStart = 1
 tr.Disk.File(regex_revalidate_conf_path, typename="ats:config").AddLines([
     path1_rule,
     'path2 {}\n'.format(int(time.time()) - 100),