dragon512 commented on a change in pull request #7232:
URL: https://github.com/apache/trafficserver/pull/7232#discussion_r498506297
##########
File path: tests/gold_tests/pluginTest/lua/lua_states_stats.test.py
##########
@@ -67,36 +71,27 @@
ps.Env = ts.Env
ps.ReturnCode = 0
ps.Streams.stdout.Content =
Testers.ContainsExpression("proxy.config.plugin.lua.max_states: 4", "expected 4
states")
-tr.TimeOut = 5
tr.StillRunningAfter = ts
# 1 Test - Exercise lua script
tr = Test.AddTestRun("Lua hello")
ps = tr.Processes.Default # alias
ps.Command = curl_and_args + ' http://hello/hello'
-ps.TimeOut = 5
ps.ReturnCode = 0
ps.Streams.stderr.Content = Testers.ContainsExpression("Hello, World", "hello
world content")
-tr.TimeOut = 5
tr.StillRunningAfter = ts
# 2 Test - Check for metrics
tr = Test.AddTestRun("Check for metrics")
-tr.DelayStart = 15 # 5s lag on metrics to update
-tr.TimeOut = 5
ps = tr.Processes.Default # alias
-ps.Env = ts.Env
-ps.Command = "traffic_ctl metric match lua"
+ps.Command = "bash -c '" + Test.TestDirectory + "/metrics.sh " +
Test.TestDirectory + "'"
Review comment:
This is not a time suck. it is about reproducibility
##########
File path: tests/gold_tests/pluginTest/lua/lua_states_stats.test.py
##########
@@ -67,36 +71,27 @@
ps.Env = ts.Env
ps.ReturnCode = 0
ps.Streams.stdout.Content =
Testers.ContainsExpression("proxy.config.plugin.lua.max_states: 4", "expected 4
states")
-tr.TimeOut = 5
tr.StillRunningAfter = ts
# 1 Test - Exercise lua script
tr = Test.AddTestRun("Lua hello")
ps = tr.Processes.Default # alias
ps.Command = curl_and_args + ' http://hello/hello'
-ps.TimeOut = 5
ps.ReturnCode = 0
ps.Streams.stderr.Content = Testers.ContainsExpression("Hello, World", "hello
world content")
-tr.TimeOut = 5
tr.StillRunningAfter = ts
# 2 Test - Check for metrics
tr = Test.AddTestRun("Check for metrics")
-tr.DelayStart = 15 # 5s lag on metrics to update
-tr.TimeOut = 5
ps = tr.Processes.Default # alias
-ps.Env = ts.Env
-ps.Command = "traffic_ctl metric match lua"
+ps.Command = "bash -c '" + Test.TestDirectory + "/metrics.sh " +
Test.TestDirectory + "'"
Review comment:
Because one can't replay the sandbox
##########
File path: tests/gold_tests/pluginTest/lua/lua_states_stats.test.py
##########
@@ -67,36 +71,27 @@
ps.Env = ts.Env
ps.ReturnCode = 0
ps.Streams.stdout.Content =
Testers.ContainsExpression("proxy.config.plugin.lua.max_states: 4", "expected 4
states")
-tr.TimeOut = 5
tr.StillRunningAfter = ts
# 1 Test - Exercise lua script
tr = Test.AddTestRun("Lua hello")
ps = tr.Processes.Default # alias
ps.Command = curl_and_args + ' http://hello/hello'
-ps.TimeOut = 5
ps.ReturnCode = 0
ps.Streams.stderr.Content = Testers.ContainsExpression("Hello, World", "hello
world content")
-tr.TimeOut = 5
tr.StillRunningAfter = ts
# 2 Test - Check for metrics
tr = Test.AddTestRun("Check for metrics")
-tr.DelayStart = 15 # 5s lag on metrics to update
-tr.TimeOut = 5
ps = tr.Processes.Default # alias
-ps.Env = ts.Env
-ps.Command = "traffic_ctl metric match lua"
+ps.Command = "bash -c '" + Test.TestDirectory + "/metrics.sh " +
Test.TestDirectory + "'"
Review comment:
The time suck to I should clarify is all the sleeps and a lack of a way
to detect that the metrics are up-to-date
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]