masaori335 commented on code in PR #13885: URL: https://github.com/apache/trafficserver/pull/13885#discussion_r4372855492
########## tests/uranium_tests/connect_down_policy/replay/connect_down_policy_4_no_connect.test.yaml: ########## @@ -0,0 +1,97 @@ +# 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. + +meta: + version: "1.0" + +urtest: + description: 'Verify connect down policy 4 when the origin connection was never opened' + + dns: + name: 'dns-policy-4-no-connect' + records: + backend.example.com: ["127.0.0.1"] + + server: + name: 'server-policy-4-no-connect' + + client: + name: 'client-policy-4-no-connect' + process_config: + run_parallel: true + + ats: + name: 'ts-policy-4-no-connect' + process_config: + enable_cache: false + + records_config: + proxy.config.diags.debug.enabled: 1 + proxy.config.diags.debug.tags: 'http|hostdb' + proxy.config.http.connect.down.policy: 4 + proxy.config.http.connect_attempts_max_retries: 0 + # The slow transaction holds the only allowed origin connection, so the second one is refused before connecting. + proxy.config.http.server_max_connections: 1 + + remap_config: + - from: "http://slow.example.com/" + to: "http://backend.example.com:{SERVER_HTTP_PORT}/" + - from: "http://refused.example.com/" + to: "http://backend.example.com:{SERVER_HTTP_PORT}/" + + log_validation: + traffic_out: + excludes: + - expression: "hostdb update marking IP: .* as down" + description: "a connect refused before an origin connection exists must not mark the origin down" + +sessions: +- transactions: + - client-request: + method: GET + url: /slow/ + version: '1.1' + headers: + fields: + - [Host, slow.example.com] + - [uuid, slow] + + server-response: + delay: 2s + status: 200 + + proxy-response: + status: 200 + +- transactions: + - client-request: + delay: 500ms + method: GET + url: /refused/ + version: '1.1' + headers: + fields: + - [Host, refused.example.com] + - [uuid, refused] + + proxy-request: + expect: absent + + server-response: + status: 200 + Review Comment: expect: absent is enforced by verifier-server itself (it fails with "Proxy request with key … unexpectedly reached the verifier-server"), so the server-response doesn't weaken the check. It's a fallback in case ATS forwards anyway, and it matches the convention in the other uranium replays that use expect: absent. -- 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]
