You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by dr...@apache.org on 2018/04/27 19:03:57 UTC

[trafficserver] branch master updated: Add ssn and txn tests for HTTP2

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

dragon 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 e3d3c1a  Add ssn and txn tests for HTTP2
e3d3c1a is described below

commit e3d3c1a6f1fe43ed7d09ddb1741d7a19636e28b0
Author: Alan Wang <xf...@gmail.com>
AuthorDate: Thu Jan 25 22:20:01 2018 +0000

    Add ssn and txn tests for HTTP2
---
 tests/gold_tests/autest-site/cli_tools.test.ext    | 55 ++++++++++++++
 tests/gold_tests/continuations/double.test.py      | 34 ++++-----
 .../{double.test.py => double_h2.test.py}          | 84 ++++++++++++++--------
 .../openclose.test.py}                             | 31 ++++----
 .../openclose_h2.test.py}                          | 84 +++++++++++++---------
 tests/gold_tests/continuations/ssl/server.key      | 15 ++++
 tests/gold_tests/continuations/ssl/server.pem      | 32 +++++++++
 tests/tools/plugins/continuations_verify.cc        |  3 -
 8 files changed, 240 insertions(+), 98 deletions(-)

diff --git a/tests/gold_tests/autest-site/cli_tools.test.ext b/tests/gold_tests/autest-site/cli_tools.test.ext
new file mode 100644
index 0000000..431abd1
--- /dev/null
+++ b/tests/gold_tests/autest-site/cli_tools.test.ext
@@ -0,0 +1,55 @@
+'''
+Tools to help with TestRun commands
+'''
+#  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.
+
+
+# allows the same command to be repeatedly run in parallel.
+#
+# example usage:
+# curlcmd = 'curl -vs -k https:127.0.0.1:{port}'.format(port = ts.Variables.port)
+#
+# tr = Test.AddTestRun()
+# ps = tr.SpawnCommands(cmdstr=cmdstr, count=25)
+# tr.Processes.Default.StartBefore(ts)
+# ts.StartAfter(*ps)
+# tr.StillRunningAfter = ts
+#
+# Note that by default, the Default Process is created in this function. 
+
+def spawn_commands(self, cmdstr, count, retcode = 0, use_default=True):
+    ret=[] 
+
+    if use_default:
+        count = int(count) - 1  
+    for cnt in range(0,count):  
+        ret.append(  
+            self.Processes.Process(  
+                name="cmdline-{num}".format(num=cnt),  
+                cmdstr = cmdstr,  
+                returncode = retcode
+                )  
+            )
+    if use_default:
+        self.Processes.Default.Command = cmdstr
+        self.Processes.Default.ReturnCode = retcode
+        self.Processes.Default.StartBefore(
+            *ret
+        )
+    return ret 
+
+ExtendTestRun(spawn_commands, name="SpawnCommands")
diff --git a/tests/gold_tests/continuations/double.test.py b/tests/gold_tests/continuations/double.test.py
index fccd584..09a417b 100644
--- a/tests/gold_tests/continuations/double.test.py
+++ b/tests/gold_tests/continuations/double.test.py
@@ -17,13 +17,11 @@
 #  limitations under the License.
 
 import os
-from random import randint
 Test.Summary = '''
-Test transactions and sessions, making sure they open and close in the proper order.
+Test transactions and sessions, making sure two continuations catch the same number of hooks.
 '''
-# need Apache Benchmark. For RHEL7, this is httpd-tools
 Test.SkipUnless(
-    Condition.HasProgram("ab", "apache benchmark (httpd-tools) needs to be installed on system for this test to work")
+    Condition.HasProgram("curl", "Curl needs to be installed on system for this test to work")
 )
 Test.ContinueOnFail = True
 # Define default ATS
@@ -50,15 +48,22 @@ ts.Disk.remap_config.AddLine(
     'map http://double.test:{0} http://127.0.0.1:{1}'.format(ts.Variables.port, server.Variables.Port)
 )
 
-numberOfRequests = randint(1000, 1500)
+cmd = 'curl -vs http://127.0.0.1:{0}'.format(ts.Variables.port)
+numberOfRequests = 25
 
-# Make a *ton* of calls to the proxy!
 tr = Test.AddTestRun()
-tr.Processes.Default.Command = 'ab -n {0} -c 10 http://127.0.0.1:{1}/;sleep 5'.format(numberOfRequests, ts.Variables.port)
-tr.Processes.Default.ReturnCode = 0
-# time delay as proxy.config.http.wait_for_cache could be broken
-tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port))
-tr.Processes.Default.StartBefore(ts, ready=When.PortOpen(ts.Variables.port))
+
+# Create a bunch of curl commands to be executed in parallel. Default.Process is set in SpawnCommands. 
+ps = tr.SpawnCommands(cmdstr=cmd,  count=numberOfRequests)
+tr.Processes.Default.Env = ts.Env
+
+# Execution order is: ts/server, ps(curl cmds), Default Process.
+tr.Processes.Default.StartBefore(
+    server, ready=When.PortOpen(server.Variables.Port))
+# Adds a delay once the ts port is ready. This is because we cannot test the ts state.
+tr.Processes.Default.StartBefore(ts, ready=10)
+ts.StartAfter(*ps)
+server.StartAfter(*ps)
 tr.StillRunningAfter = ts
 
 comparator_command = '''
@@ -71,14 +76,9 @@ if test "`traffic_ctl metric get continuations_verify.{0}.close.1 | cut -d ' ' -
 
 records = ts.Disk.File(os.path.join(ts.Variables.RUNTIMEDIR, "records.snap"))
 
-
-def file_is_ready():
-    return os.path.exists(records.AbsPath)
-
-
 # number of sessions/transactions opened and closed are equal
 tr = Test.AddTestRun()
-tr.DelayStart=10 
+tr.DelayStart = 10 # wait for stats to be updated
 tr.Processes.Default.Command = comparator_command.format('ssn')
 tr.Processes.Default.ReturnCode = 0
 tr.Processes.Default.Env = ts.Env
diff --git a/tests/gold_tests/continuations/double.test.py b/tests/gold_tests/continuations/double_h2.test.py
similarity index 59%
copy from tests/gold_tests/continuations/double.test.py
copy to tests/gold_tests/continuations/double_h2.test.py
index fccd584..7431ffd 100644
--- a/tests/gold_tests/continuations/double.test.py
+++ b/tests/gold_tests/continuations/double_h2.test.py
@@ -17,49 +17,58 @@
 #  limitations under the License.
 
 import os
-from random import randint
 Test.Summary = '''
-Test transactions and sessions, making sure they open and close in the proper order.
+Test transactions and sessions for http2, making sure the two continuations catch the same number of hooks.
 '''
-# need Apache Benchmark. For RHEL7, this is httpd-tools
 Test.SkipUnless(
-    Condition.HasProgram("ab", "apache benchmark (httpd-tools) needs to be installed on system for this test to work")
+    Condition.HasProgram("curl", "Curl needs to be installed on system for this test to work"),
+    Condition.HasCurlFeature('http2')
 )
 Test.ContinueOnFail = True
 # Define default ATS
-ts = Test.MakeATSProcess("ts", command="traffic_manager")
-
+ts = Test.MakeATSProcess("ts", select_ports=False, command="traffic_manager")
 server = Test.MakeOriginServer("server")
 
 Test.testName = ""
-request_header = {"headers": "GET / HTTP/1.1\r\nHost: double.test\r\n\r\n", "timestamp": "1469733493.993", "body": ""}
+request_header = {"headers": "GET / HTTP/1.1\r\nHost: double_h2.test\r\n\r\n", "timestamp": "1469733493.993", "body": ""}
 # expected response from the origin server
-response_header = {"headers": "HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n", "timestamp": "1469733493.993", "body": ""}
-
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'continuations_verify.cc'), ts)
+response_header = {"headers": "HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n",
+                   "timestamp": "1469733493.993", "body": ""}
 
 # add response to the server dictionary
 server.addResponse("sessionfile.log", request_header, response_header)
+
+# add ssl materials like key, certificates for the server
+ts.addSSLfile("ssl/server.pem")
+ts.addSSLfile("ssl/server.key")
+
+# add port and remap rule
+ts.Variables.ssl_port = 4443
+ts.Disk.remap_config.AddLine(
+    'map http://double_h2.test:{0} http://127.0.0.1:{1}'.format(ts.Variables.port, server.Variables.Port)
+)
+
+ts.Disk.ssl_multicert_config.AddLine(
+    'dest_ip=* ssl_cert_name=server.pem ssl_key_name=server.key'
+)
+
 ts.Disk.records_config.update({
     'proxy.config.diags.debug.enabled': 1,
     'proxy.config.diags.debug.tags': 'continuations_verify.*',
-    'proxy.config.http.cache.http' : 0, #disable cache to simply the test.
-    'proxy.config.cache.enable_read_while_writer' : 0
+    '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.cache.http': 0,  # disable cache to simply the test.
+    'proxy.config.cache.enable_read_while_writer': 0,
+     # enable ssl port
+    'proxy.config.http.server_ports': '{0} {1}:proto=http2;http:ssl'.format(ts.Variables.port, ts.Variables.ssl_port),
+    'proxy.config.ssl.client.verify.server':  0,
+    'proxy.config.ssl.server.cipher_suite': 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:RC4-SHA:RC4-MD5:AES128-SHA:AES256-SHA:DES-CBC3-SHA!SRP:!DSS:!PSK:!aNULL:!eNULL:!SSLv2',
+    'proxy.config.http2.max_concurrent_streams_in': 65535
 })
-ts.Disk.remap_config.AddLine(
-    'map http://double.test:{0} http://127.0.0.1:{1}'.format(ts.Variables.port, server.Variables.Port)
-)
 
-numberOfRequests = randint(1000, 1500)
-
-# Make a *ton* of calls to the proxy!
-tr = Test.AddTestRun()
-tr.Processes.Default.Command = 'ab -n {0} -c 10 http://127.0.0.1:{1}/;sleep 5'.format(numberOfRequests, ts.Variables.port)
-tr.Processes.Default.ReturnCode = 0
-# time delay as proxy.config.http.wait_for_cache could be broken
-tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port))
-tr.Processes.Default.StartBefore(ts, ready=When.PortOpen(ts.Variables.port))
-tr.StillRunningAfter = ts
+# add plugin to assist with test metrics
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir,
+                                 'plugins', 'continuations_verify.cc'), ts)
 
 comparator_command = '''
 if test "`traffic_ctl metric get continuations_verify.{0}.close.1 | cut -d ' ' -f 2`" -eq "`traffic_ctl metric get continuations_verify.{0}.close.2 | cut -d ' ' -f 2`" ; then\
@@ -69,21 +78,37 @@ if test "`traffic_ctl metric get continuations_verify.{0}.close.1 | cut -d ' ' -
     fi;
     '''
 
-records = ts.Disk.File(os.path.join(ts.Variables.RUNTIMEDIR, "records.snap"))
+# curl with http2
+cmd = 'curl --http2 -k -vs https://127.0.0.1:{0}/'.format(ts.Variables.ssl_port)
+numberOfRequests = 25
 
+tr = Test.AddTestRun()
 
-def file_is_ready():
-    return os.path.exists(records.AbsPath)
+# Create a bunch of curl commands to be executed in parallel. Default.Process is set in SpawnCommands. 
+ps = tr.SpawnCommands(cmdstr=cmd, count=numberOfRequests)
+tr.Processes.Default.Env = ts.Env
 
+# Execution order is: ts/server, ps(curl cmds), Default Process.
+tr.Processes.Default.StartBefore(
+    server, ready=When.PortOpen(server.Variables.Port))
+# Adds a delay once the ts port is ready. This is because we cannot test the ts state.
+tr.Processes.Default.StartBefore(ts, ready=10)
+ts.StartAfter(*ps)
+server.StartAfter(*ps)
+tr.StillRunningAfter = ts
+
+# Watch the records snapshot file.
+records = ts.Disk.File(os.path.join(ts.Variables.RUNTIMEDIR, "records.snap"))
 
 # number of sessions/transactions opened and closed are equal
 tr = Test.AddTestRun()
-tr.DelayStart=10 
+tr.DelayStart = 10 # wait for stats to be updated
 tr.Processes.Default.Command = comparator_command.format('ssn')
 tr.Processes.Default.ReturnCode = 0
 tr.Processes.Default.Env = ts.Env
 tr.Processes.Default.Streams.stdout = Testers.ContainsExpression("yes", 'should verify contents')
 tr.StillRunningAfter = ts
+
 # for debugging session number
 ssn1 = tr.Processes.Process("session1", 'traffic_ctl metric get continuations_verify.ssn.close.1 > ssn1')
 ssn2 = tr.Processes.Process("session2", 'traffic_ctl metric get continuations_verify.ssn.close.2 > ssn2')
@@ -98,6 +123,7 @@ tr.Processes.Default.ReturnCode = 0
 tr.Processes.Default.Env = ts.Env
 tr.Processes.Default.Streams.stdout = Testers.ContainsExpression("yes", 'should verify contents')
 tr.StillRunningAfter = ts
+
 # for debugging transaction number
 txn1 = tr.Processes.Process("transaction1", 'traffic_ctl metric get continuations_verify.txn.close.1 > txn1')
 txn2 = tr.Processes.Process("transaction2", 'traffic_ctl metric get continuations_verify.txn.close.2 > txn2')
diff --git a/tests/gold_tests/transaction/txn.test.py b/tests/gold_tests/continuations/openclose.test.py
similarity index 84%
copy from tests/gold_tests/transaction/txn.test.py
copy to tests/gold_tests/continuations/openclose.test.py
index 6f78fc2..2cbe40d 100644
--- a/tests/gold_tests/transaction/txn.test.py
+++ b/tests/gold_tests/continuations/openclose.test.py
@@ -17,14 +17,12 @@
 #  limitations under the License.
 
 import os
-from random import randint
 Test.Summary = '''
 Test transactions and sessions, making sure they open and close in the proper order.
 '''
-# need Apache Benchmark. For RHEL7, this is httpd-tools
+
 Test.SkipUnless(
-    Condition.HasProgram(
-        "ab", "apache benchmark (httpd-tools) needs to be installed on system for this test to work")
+    Condition.HasProgram("curl", "Curl needs to be installed on system for this test to work")
 )
 
 # Define default ATS
@@ -33,7 +31,7 @@ ts = Test.MakeATSProcess("ts", command="traffic_manager")
 server = Test.MakeOriginServer("server")
 
 Test.testName = ""
-request_header = {"headers": "GET / HTTP/1.1\r\nHost: txn.test\r\n\r\n",
+request_header = {"headers": "GET / HTTP/1.1\r\nHost: oc.test\r\n\r\n",
                   "timestamp": "1469733493.993", "body": ""}
 # expected response from the origin server
 response_header = {"headers": "HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n",
@@ -52,27 +50,30 @@ ts.Disk.records_config.update({
 })
 
 ts.Disk.remap_config.AddLine(
-    'map http://txn.test:{0} http://127.0.0.1:{1}'.format(
+    'map http://oc.test:{0} http://127.0.0.1:{1}'.format(
         ts.Variables.port, server.Variables.Port)
 )
 
-numberOfRequests = randint(1000, 1500)
+cmd = 'curl -vs http://127.0.0.1:{0}'.format(ts.Variables.port)
+numberOfRequests = 25
 
-# Make a *ton* of calls to the proxy!
 tr = Test.AddTestRun()
-tr.Processes.Default.Command = 'ab -n {0} -c 10 -X 127.0.0.1:{1} http://txn.test/;sleep 5'.format(
-    numberOfRequests, ts.Variables.port)
-tr.Processes.Default.ReturnCode = 0
-# time delay as proxy.config.http.wait_for_cache could be broken
+# Create a bunch of curl commands to be executed in parallel. Default.Process is set in SpawnCommands. 
+ps = tr.SpawnCommands(cmdstr=cmd,  count=numberOfRequests)
+tr.Processes.Default.Env = ts.Env
+
+# Execution order is: ts/server, ps(curl cmds), Default Process.
 tr.Processes.Default.StartBefore(
     server, ready=When.PortOpen(server.Variables.Port))
-tr.Processes.Default.StartBefore(ts, ready=When.PortOpen(ts.Variables.port))
+# Adds a delay once the ts port is ready. This is because we cannot test the ts state.
+tr.Processes.Default.StartBefore(ts, ready=10)
+ts.StartAfter(*ps)
+server.StartAfter(*ps)
 tr.StillRunningAfter = ts
 
 # Watch the records snapshot file.
 records = ts.Disk.File(os.path.join(ts.Variables.RUNTIMEDIR, "records.snap"))
 
-
 # Check our work on traffic_ctl
 # no errors happened,
 tr = Test.AddTestRun()
@@ -130,4 +131,4 @@ tr.Processes.Default.Env = ts.Env
 tr.Processes.Default.Streams.stdout = Testers.ContainsExpression(
     "ssntxnorder_verify.txn.start {}".format(numberOfRequests), 'should be the number of transactions we made')
 tr.StillRunningAfter = ts
-tr.StillRunningAfter = server
+tr.StillRunningAfter = server
\ No newline at end of file
diff --git a/tests/gold_tests/transaction/txn.test.py b/tests/gold_tests/continuations/openclose_h2.test.py
similarity index 65%
rename from tests/gold_tests/transaction/txn.test.py
rename to tests/gold_tests/continuations/openclose_h2.test.py
index 6f78fc2..bbd13f2 100644
--- a/tests/gold_tests/transaction/txn.test.py
+++ b/tests/gold_tests/continuations/openclose_h2.test.py
@@ -17,62 +17,86 @@
 #  limitations under the License.
 
 import os
-from random import randint
 Test.Summary = '''
-Test transactions and sessions, making sure they open and close in the proper order.
+Test transactions and sessions for http2, making sure they open and close in the proper order.
 '''
-# need Apache Benchmark. For RHEL7, this is httpd-tools
 Test.SkipUnless(
-    Condition.HasProgram(
-        "ab", "apache benchmark (httpd-tools) needs to be installed on system for this test to work")
+    Condition.HasProgram("curl", "Curl needs to be installed on system for this test to work"),
+    Condition.HasCurlFeature('http2')
 )
-
+Test.ContinueOnFail = True
 # Define default ATS
-ts = Test.MakeATSProcess("ts", command="traffic_manager")
-
+ts = Test.MakeATSProcess("ts", select_ports=False, command="traffic_manager")
 server = Test.MakeOriginServer("server")
 
 Test.testName = ""
-request_header = {"headers": "GET / HTTP/1.1\r\nHost: txn.test\r\n\r\n",
-                  "timestamp": "1469733493.993", "body": ""}
+request_header = {"headers": "GET / HTTP/1.1\r\nHost: oc_h2.test\r\n\r\n", "timestamp": "1469733493.993", "body": ""}
 # expected response from the origin server
 response_header = {"headers": "HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n",
                    "timestamp": "1469733493.993", "body": ""}
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir,
-                                'plugins', 'ssntxnorder_verify.cc'), ts)
-
 # add response to the server dictionary
 server.addResponse("sessionfile.log", request_header, response_header)
+
+ts.addSSLfile("ssl/server.pem")
+ts.addSSLfile("ssl/server.key")
+
+ts.Variables.ssl_port = 4443
+ts.Disk.remap_config.AddLine(
+    'map http://oc_h2.test:{0} http://127.0.0.1:{1}'.format(ts.Variables.port, server.Variables.Port)
+)
+
+ts.Disk.ssl_multicert_config.AddLine(
+    'dest_ip=* ssl_cert_name=server.pem ssl_key_name=server.key'
+)
+
 ts.Disk.records_config.update({
     'proxy.config.diags.debug.enabled': 1,
     'proxy.config.diags.debug.tags': 'ssntxnorder_verify.*',
+    '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.cache.http': 0,  # disable cache to simply the test.
-    'proxy.config.cache.enable_read_while_writer': 0
+    'proxy.config.cache.enable_read_while_writer': 0,
+     # enable ssl port
+    'proxy.config.http.server_ports': '{0} {1}:proto=http2;http:ssl'.format(ts.Variables.port, ts.Variables.ssl_port),
+    'proxy.config.ssl.client.verify.server':  0,
+    'proxy.config.ssl.server.cipher_suite': 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:RC4-SHA:RC4-MD5:AES128-SHA:AES256-SHA:DES-CBC3-SHA!SRP:!DSS:!PSK:!aNULL:!eNULL:!SSLv2',
+    'proxy.config.http2.max_concurrent_streams_in': 65535
 })
 
-ts.Disk.remap_config.AddLine(
-    'map http://txn.test:{0} http://127.0.0.1:{1}'.format(
-        ts.Variables.port, server.Variables.Port)
-)
+# add plugin to assist with test metrics
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir,
+                                'plugins', 'ssntxnorder_verify.cc'), ts)
+
+comparator_command = '''
+if test "`traffic_ctl metric get ssntxnorder_verify.{0}.start | cut -d ' ' -f 2`" -eq "`traffic_ctl metric get ssntxnorder_verify.{0}.close | cut -d ' ' -f 2`" ; then\
+     echo yes;\
+    else \
+    echo no; \
+    fi;
+    '''
 
-numberOfRequests = randint(1000, 1500)
+# curl with http2
+cmd = 'curl --http2 -k -vs https://127.0.0.1:{0}/'.format(ts.Variables.ssl_port)
+numberOfRequests = 25
 
-# Make a *ton* of calls to the proxy!
 tr = Test.AddTestRun()
-tr.Processes.Default.Command = 'ab -n {0} -c 10 -X 127.0.0.1:{1} http://txn.test/;sleep 5'.format(
-    numberOfRequests, ts.Variables.port)
-tr.Processes.Default.ReturnCode = 0
-# time delay as proxy.config.http.wait_for_cache could be broken
+# Create a bunch of curl commands to be executed in parallel. Default.Process is set in SpawnCommands. 
+ps = tr.SpawnCommands(cmdstr=cmd, count=numberOfRequests)
+tr.Processes.Default.Env = ts.Env
+
+# Execution order is: ts/server, ps(curl cmds), Default Process.
 tr.Processes.Default.StartBefore(
     server, ready=When.PortOpen(server.Variables.Port))
-tr.Processes.Default.StartBefore(ts, ready=When.PortOpen(ts.Variables.port))
+# Adds a delay once the ts port is ready. This is because we cannot test the ts state. 
+tr.Processes.Default.StartBefore(ts, ready=10)
+ts.StartAfter(*ps)
+server.StartAfter(*ps)
 tr.StillRunningAfter = ts
 
 # Watch the records snapshot file.
 records = ts.Disk.File(os.path.join(ts.Variables.RUNTIMEDIR, "records.snap"))
 
-
 # Check our work on traffic_ctl
 # no errors happened,
 tr = Test.AddTestRun()
@@ -85,14 +109,6 @@ tr.Processes.Default.Streams.All = Testers.ContainsExpression(
 tr.StillRunningAfter = ts
 tr.StillRunningAfter = server
 
-comparator_command = '''
-if test "`traffic_ctl metric get ssntxnorder_verify.{0}.start | cut -d ' ' -f 2`" -eq "`traffic_ctl metric get ssntxnorder_verify.{0}.close | cut -d ' ' -f 2`" ; then\
-     echo yes;\
-    else \
-    echo no; \
-    fi;
-    '''
-
 # number of sessions/transactions opened and closed are equal
 tr = Test.AddTestRun()
 tr.Processes.Default.Command = comparator_command.format('ssn')
diff --git a/tests/gold_tests/continuations/ssl/server.key b/tests/gold_tests/continuations/ssl/server.key
new file mode 100644
index 0000000..4c7a661
--- /dev/null
+++ b/tests/gold_tests/continuations/ssl/server.key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQDWMHOiUF+ORmZjAxI8MWE9dblb7gQSJ36WCXlPFiFx6ynF+S1E
+kXAYpIip5X0pzDUaIbLukxJUAAnOtMEO0PCgxJQUrEtRWh8wiJdbdQJF0Zs/9R+u
+SUgb61f+mdTQvhqefBGx+xrpfAcgtcWiZuSA9Q3fvpDj5WOWSPWXBUuxywIDAQAB
+AoGBAJPxRX2gjFAGWmQbU/YVmXfNH6navh8X/nx9sLeqrpE0AFeJI/ZPiqDKzMal
+B43eSfNxwVi+ZxN0L1ICUbL9KKZvHs/QBxWLA1fGVAXrz7sRplEVvakPpTfHoEnv
+sKaMWVKaK/S5WGbDhElb6zb/Lwo19DsIAPjGYqFvzFJBmobJAkEA9iSeTGkR9X26
+GywZoYrIMlRh34htOIRx1UUq88rFzdrCF21kQ4lhBIkX5OZMMy652i2gyak4OZTe
+YewIv8jw9QJBAN7EQNHG8jPwXfVp91/fqxVQEfumuP2i6uiWWYQgZCmla2+0xcLZ
+pMQ6sQEe10hhTrVnzHgAUVp50Ntn2jwBX78CQF09veGAI9d1Cxzj9cmmAvRd1r2Q
+tp8kPOLnUsALXib+6WtqewLCdcf8DtsdClyRJMIraq85tRzK8fryKNZNzkkCQEgA
+yS7FDj5JgCU15hZgFk1iPx3HCt44jZM2HaL+UUHAzRQjKxTLAl3G1rWVAWLMyQML
+lORoveLvotl4HOruSsMCQQCAx9dV9JUSFoyc1CWILp/FgUH/se4cjQCThGO0DoQQ
+vGTYmntY7j9WRJ9esQrjdD6Clw8zM/45GIBNwnXzqo7Z
+-----END RSA PRIVATE KEY-----
diff --git a/tests/gold_tests/continuations/ssl/server.pem b/tests/gold_tests/continuations/ssl/server.pem
new file mode 100644
index 0000000..3584a2e
--- /dev/null
+++ b/tests/gold_tests/continuations/ssl/server.pem
@@ -0,0 +1,32 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQDWMHOiUF+ORmZjAxI8MWE9dblb7gQSJ36WCXlPFiFx6ynF+S1E
+kXAYpIip5X0pzDUaIbLukxJUAAnOtMEO0PCgxJQUrEtRWh8wiJdbdQJF0Zs/9R+u
+SUgb61f+mdTQvhqefBGx+xrpfAcgtcWiZuSA9Q3fvpDj5WOWSPWXBUuxywIDAQAB
+AoGBAJPxRX2gjFAGWmQbU/YVmXfNH6navh8X/nx9sLeqrpE0AFeJI/ZPiqDKzMal
+B43eSfNxwVi+ZxN0L1ICUbL9KKZvHs/QBxWLA1fGVAXrz7sRplEVvakPpTfHoEnv
+sKaMWVKaK/S5WGbDhElb6zb/Lwo19DsIAPjGYqFvzFJBmobJAkEA9iSeTGkR9X26
+GywZoYrIMlRh34htOIRx1UUq88rFzdrCF21kQ4lhBIkX5OZMMy652i2gyak4OZTe
+YewIv8jw9QJBAN7EQNHG8jPwXfVp91/fqxVQEfumuP2i6uiWWYQgZCmla2+0xcLZ
+pMQ6sQEe10hhTrVnzHgAUVp50Ntn2jwBX78CQF09veGAI9d1Cxzj9cmmAvRd1r2Q
+tp8kPOLnUsALXib+6WtqewLCdcf8DtsdClyRJMIraq85tRzK8fryKNZNzkkCQEgA
+yS7FDj5JgCU15hZgFk1iPx3HCt44jZM2HaL+UUHAzRQjKxTLAl3G1rWVAWLMyQML
+lORoveLvotl4HOruSsMCQQCAx9dV9JUSFoyc1CWILp/FgUH/se4cjQCThGO0DoQQ
+vGTYmntY7j9WRJ9esQrjdD6Clw8zM/45GIBNwnXzqo7Z
+-----END RSA PRIVATE KEY-----
+-----BEGIN CERTIFICATE-----
+MIICszCCAhwCCQCl0Y79KkYjpzANBgkqhkiG9w0BAQUFADCBnTELMAkGA1UEBhMC
+VVMxCzAJBgNVBAgTAklMMRIwEAYDVQQHEwlDaGFtcGFpZ24xDjAMBgNVBAoTBVlh
+aG9vMQ0wCwYDVQQLEwRFZGdlMSgwJgYDVQQDEx9qdWljZXByb2R1Y2UuY29ycC5u
+ZTEueWFob28uY29tMSQwIgYJKoZIhvcNAQkBFhVwZXJzaWEuYXppekB5YWhvby5j
+b20wHhcNMTcwODI4MDI1MjI5WhcNMjcwODI2MDI1MjI5WjCBnTELMAkGA1UEBhMC
+VVMxCzAJBgNVBAgTAklMMRIwEAYDVQQHEwlDaGFtcGFpZ24xDjAMBgNVBAoTBVlh
+aG9vMQ0wCwYDVQQLEwRFZGdlMSgwJgYDVQQDEx9qdWljZXByb2R1Y2UuY29ycC5u
+ZTEueWFob28uY29tMSQwIgYJKoZIhvcNAQkBFhVwZXJzaWEuYXppekB5YWhvby5j
+b20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANYwc6JQX45GZmMDEjwxYT11
+uVvuBBInfpYJeU8WIXHrKcX5LUSRcBikiKnlfSnMNRohsu6TElQACc60wQ7Q8KDE
+lBSsS1FaHzCIl1t1AkXRmz/1H65JSBvrV/6Z1NC+Gp58EbH7Gul8ByC1xaJm5ID1
+Dd++kOPlY5ZI9ZcFS7HLAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAASZbz+d+DdI+
+ypesJrlBRosXh0w8sIjkUSSdT/OuKEVzfH/dRcb4VZDW/W2gmm0VEqSN2xYYVpW3
+hUsW2J+kByqFqX6selREwo8ui8kkyBJVo0y/MCrGM0C3qw1cSaiKoa5OqlOyO3hb
+ZC9IIyWmpBxRmJFfIwS6MoTpe0/ZTJQ=
+-----END CERTIFICATE-----
diff --git a/tests/tools/plugins/continuations_verify.cc b/tests/tools/plugins/continuations_verify.cc
index a40d2b2..d87fd51 100644
--- a/tests/tools/plugins/continuations_verify.cc
+++ b/tests/tools/plugins/continuations_verify.cc
@@ -26,9 +26,6 @@
 #define __STDC_FORMAT_MACROS 1 // for inttypes.h
 #include <inttypes.h>          // for PRIu64
 #include <iostream>
-#include <map>
-#include <set>
-#include <sstream>
 #include <stdlib.h> // for abort
 #include <string.h> // for NULL macro
 #include <ts/ts.h>  // for debug

-- 
To stop receiving notification emails like this one, please contact
dragon@apache.org.