JosiahWI commented on code in PR #12618:
URL: https://github.com/apache/trafficserver/pull/12618#discussion_r2474184491
##########
tests/gold_tests/headers/normalized_ae_match_vary_cache.test.py:
##########
@@ -31,7 +31,43 @@
replay_file = "replays/normalized_ae_varied_transactions.replay.yaml"
server = Test.MakeVerifierServerProcess("server", replay_file)
-ts = Test.MakeATSProcess("ts", enable_cache=True)
+# Verify that cache hit requests never reach the server
+# Case 2 (normalize_ae:1) cache hits
+server.Streams.stdout += Testers.ExcludesExpression(
+ "uuid: 12", "Verify empty Accept-Encoding (uuid 12) is a cache hit and
doesn't reach the server.")
+server.Streams.stdout += Testers.ExcludesExpression(
+ "uuid: 13", "Verify deflate request (uuid 13) is a cache hit and doesn't
reach the server.")
+server.Streams.stdout += Testers.ExcludesExpression(
+ "uuid: 14", "Verify br,compress request (uuid 14) is a cache hit and
doesn't reach the server.")
+server.Streams.stdout += Testers.ExcludesExpression(
+ "uuid: 16", "Verify br,compress,gzip request (uuid 16) is a cache hit and
doesn't reach the server.")
+# Case 3 (normalize_ae:2) cache hits
+server.Streams.stdout += Testers.ExcludesExpression(
+ "uuid: 22", "Verify empty Accept-Encoding (uuid 22) is a cache hit and
doesn't reach the server.")
+server.Streams.stdout += Testers.ExcludesExpression(
+ "uuid: 23", "Verify deflate request (uuid 23) is a cache hit and doesn't
reach the server.")
+server.Streams.stdout += Testers.ExcludesExpression(
+ "uuid: 26", "Verify br,compress,gzip request (uuid 26) is a cache hit and
doesn't reach the server.")
+server.Streams.stdout += Testers.ExcludesExpression(
+ "uuid: 27", "Verify compress,gzip request (uuid 27) is a cache hit and
doesn't reach the server.")
+# Case 4 (normalize_ae:3) cache hits
+server.Streams.stdout += Testers.ExcludesExpression(
+ "uuid: 32", "Verify empty Accept-Encoding (uuid 32) is a cache hit and
doesn't reach the server.")
+server.Streams.stdout += Testers.ExcludesExpression(
+ "uuid: 33", "Verify deflate request (uuid 33) is a cache hit and doesn't
reach the server.")
+server.Streams.stdout += Testers.ExcludesExpression(
+ "uuid: 37", "Verify compress,gzip request (uuid 37) is a cache hit and
doesn't reach the server.")
+server.Streams.stdout += Testers.ExcludesExpression(
+ "uuid: 38", "Verify br;q=1.1 request (uuid 38) is a cache hit and doesn't
reach the server.")
+server.Streams.stdout += Testers.ExcludesExpression(
+ "uuid: 39", "Verify br,gzip;q=0.8 request (uuid 39) is a cache hit and
doesn't reach the server.")
+
+ts = Test.MakeATSProcess("ts", enable_cache=True, select_ports=False)
+# Hardcode port to avoid port binding issues
+ts.Variables.port = 8765
+ts.Disk.records_config.update({
+ 'proxy.config.http.server_ports': f'{ts.Variables.port}',
+})
Review Comment:
I'm curious why this was necessary.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]