Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions tests/gold_tests/autest-site/trafficserver.test.ext
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def make_id(s):


def MakeATSProcess(obj, name, command='traffic_server', select_ports=True,
enable_tls=False, enable_cache=True):
enable_tls=False, enable_cache=True, enable_quic=False):
#####################################
# common locations

Expand Down Expand Up @@ -304,15 +304,23 @@ def MakeATSProcess(obj, name, command='traffic_server', select_ports=True,
'proxy.config.http.cache.http': 0
})

if enable_quic:
p.Disk.records_config.update({
'proxy.config.udp.threads': 1,
})

# The following message was added so that tests and users can know when
# Traffic Server is ready to both receive and optimize traffic.
p.Ready = When.FileContains(p.Disk.diags_log.AbsPath, "NOTE: Traffic Server is fully initialized")

if select_ports:
# default config
port_str = "{port} {v6_port}:ipv6 ".format(port=p.Variables.port, v6_port=p.Variables.portv6)
port_str = "{port} {v6_port}:ipv6".format(port=p.Variables.port, v6_port=p.Variables.portv6)
if enable_tls:
port_str += "{ssl_port}:ssl {ssl_portv6}:ssl:ipv6".format(
port_str += " {ssl_port}:ssl {ssl_portv6}:ssl:ipv6".format(
ssl_port=p.Variables.ssl_port, ssl_portv6=p.Variables.ssl_portv6)
if enable_quic:
port_str += " {ssl_port}:quic {ssl_portv6}:quic:ipv6".format(
Copy link
Member Author

@maskit maskit Jul 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reused ssl port number for QUIC. If the port number was 2000 (random number), both TCP 2000 and UDP 2000 would open (if both enable_tls and enable_quic are true).

ssl_port=p.Variables.ssl_port, ssl_portv6=p.Variables.ssl_portv6)
#p.Env['PROXY_CONFIG_HTTP_SERVER_PORTS'] = port_str
p.Disk.records_config.update({
Expand Down
7 changes: 6 additions & 1 deletion tests/gold_tests/timeout/active_timeout.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
Condition.HasCurlFeature('http2')
)

ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True)
ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True, enable_quic=True)
server = Test.MakeOriginServer("server", delay=8)

request_header = {"headers": "GET /file HTTP/1.1\r\nHost: *\r\n\r\n", "timestamp": "5678", "body": ""}
Expand Down Expand Up @@ -60,3 +60,8 @@
tr3= Test.AddTestRun("tr")
tr3.Processes.Default.Command = 'curl -k -i --http2 https://127.0.0.1:{0}/file'.format(ts.Variables.ssl_port)
tr3.Processes.Default.Streams.stdout = Testers.ContainsExpression("Activity Timeout", "Request should fail with active timeout")

if Condition.HasATSFeature('TS_USE_QUIC') and Condition.HasCurlFeature('http3'):
tr4= Test.AddTestRun("tr")
tr4.Processes.Default.Command = 'curl -k -i --http3 https://127.0.0.1:{0}/file'.format(ts.Variables.ssl_port)
tr4.Processes.Default.Streams.stdout = Testers.ContainsExpression("Activity Timeout", "Request should fail with active timeout")