-
Notifications
You must be signed in to change notification settings - Fork 851
Add AuTest for connect_attempts rr_retries and max_retries #12932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| ''' | ||
| Verify Origin Server Connect Attempts Behavior | ||
| ''' | ||
| # 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. | ||
|
|
||
| Test.Summary = ''' | ||
| Verify Origin Server Connect Attempts Behavior | ||
| ''' | ||
|
|
||
| # No retry | ||
| Test.ATSReplayTest(replay_file="replay/connect_attempts_rr_no_retry.replay.yaml") | ||
|
|
||
| # max_retries | ||
| Test.ATSReplayTest(replay_file="replay/connect_attempts_rr_max_retries.replay.yaml") | ||
|
|
||
| # rr_retries | ||
| Test.ATSReplayTest(replay_file="replay/connect_attempts_rr_retries.replay.yaml") |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| `` CONNECT: attempt fail [CONNECTION_ERROR] to 0.0.0.1:`` for host='example.com' `` retry_attempts=0 url='http://backend.example.com:``/path/' | ||
| `` CONNECT: attempt fail [CONNECTION_ERROR] to 0.0.0.1:`` for host='example.com' `` retry_attempts=1 url='http://backend.example.com:``/path/' | ||
| `` CONNECT: attempt fail [CONNECTION_ERROR] to 0.0.0.1:`` for host='example.com' `` retry_attempts=2 url='http://backend.example.com:``/path/' | ||
| `` CONNECT : `` connecting to 0.0.0.1:`` for host='example.com' url='http://backend.example.com:``/path/' fail_count='1' marking down | ||
| `` CONNECT: attempt fail [CONNECTION_ERROR] to 0.0.0.2:`` for host='example.com' `` retry_attempts=0 url='http://backend.example.com:``/path/' | ||
| `` CONNECT: attempt fail [CONNECTION_ERROR] to 0.0.0.2:`` for host='example.com' `` retry_attempts=1 url='http://backend.example.com:``/path/' | ||
| `` CONNECT: attempt fail [CONNECTION_ERROR] to 0.0.0.2:`` for host='example.com' `` retry_attempts=2 url='http://backend.example.com:``/path/' | ||
| `` CONNECT : `` connecting to 0.0.0.2:`` for host='example.com' url='http://backend.example.com:``/path/' fail_count='1' marking down | ||
| `` DNS Error: no valid server http://backend.example.com:``/path/ | ||
| `` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| `` CONNECT: attempt fail [CONNECTION_ERROR] to 0.0.0.1:`` for host='example.com' `` retry_attempts=0 url='http://backend.example.com:``/path/' | ||
| `` CONNECT : `` connecting to 0.0.0.1:`` for host='example.com' url='http://backend.example.com:``/path/' fail_count='1' marking down | ||
| `` CONNECT: attempt fail [CONNECTION_ERROR] to 0.0.0.2:`` for host='example.com' `` retry_attempts=0 url='http://backend.example.com:``/path/' | ||
| `` CONNECT : `` connecting to 0.0.0.2:`` for host='example.com' url='http://backend.example.com:``/path/' fail_count='1' marking down | ||
| `` DNS Error: no valid server http://backend.example.com:``/path/ | ||
| `` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| `` CONNECT: attempt fail [CONNECTION_ERROR] to 0.0.0.1:`` for host='example.com' `` retry_attempts=0 url='http://backend.example.com:``/path/' | ||
| `` CONNECT: attempt fail [CONNECTION_ERROR] to 0.0.0.1:`` for host='example.com' `` retry_attempts=0 url='http://backend.example.com:``/path/' | ||
| `` CONNECT : `` connecting to 0.0.0.1:`` for host='example.com' url='http://backend.example.com:``/path/' fail_count='2' marking down | ||
| `` CONNECT: attempt fail [CONNECTION_ERROR] to 0.0.0.2:`` for host='example.com' `` retry_attempts=0 url='http://backend.example.com:``/path/' | ||
| `` CONNECT: attempt fail [CONNECTION_ERROR] to 0.0.0.2:`` for host='example.com' `` retry_attempts=0 url='http://backend.example.com:``/path/' | ||
| `` CONNECT : `` connecting to 0.0.0.2:`` for host='example.com' url='http://backend.example.com:``/path/' fail_count='2' marking down | ||
| `` DNS Error: no valid server http://backend.example.com:``/path/ |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,133 @@ | ||||||
| # 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. | ||||||
|
|
||||||
| # | ||||||
| # This replay file assumes that caching is enabled. | ||||||
|
||||||
| # This replay file assumes that caching is enabled. | |
| # This replay file runs with ATS caching disabled. |
Copilot
AI
Mar 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling: "immidiately" should be "immediately" in this comment (and consider rewording to a full sentence for clarity).
| # request expected hit down_server cache and immidiately get 500 | |
| # The request is expected to hit the down_server cache and immediately receive a 500 response. |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,133 @@ | ||||||
| # 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. | ||||||
|
|
||||||
| # | ||||||
| # This replay file assumes that caching is enabled. | ||||||
|
||||||
| # This replay file assumes that caching is enabled. | |
| # This replay file runs with caching disabled. |
Copilot
AI
Mar 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling: "immidiately" should be "immediately" in this comment (and consider rewording to a full sentence for clarity).
| # request expected hit down_server cache and immidiately get 500 | |
| # This request is expected to hit the down_server cache and immediately receive a 500 response. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In
ATSReplayTest, the guardif log_validation != None and log_validation['error_log'] != None:can raise aKeyErrorwhenautest.ats.log_validationexists but does not defineerror_log(e.g. many existing replay tests only usetraffic_out/diags_log). Please switch to a safe lookup (e.g.error_log_cfg = (log_validation or {}).get('error_log')) and check that value instead.