Skip to content

Look into modifying retry-after headers to eliminate playback test poll waiting #35839

@mccoyp

Description

@mccoyp

In early iterations of our test tooling, when recordings were run on vcrpy, tests used a unique way of bypassing wait times during polling operations in playback. While writing recordings to disk, the retry-after header in responses would be manually changed to be 0 so that clients would be told not to wait between polling requests when recordings were read in playback:

def internal_scrub(key, val):
if key.lower() == "retry-after":
return "0"

#35677 attempted to tackle this playback sleep skipping by adding central fixtures that monkeypatch time.sleep and asyncio.sleep methods. It would be worth revisiting our old approach, which could possibly be more broadly applied automatically without unwanted side effects. We might be able to use header sanitizers through the test proxy to record retry-after values in the same way we used to -- we'd just need to ensure that this has the desired effect in playback.

Metadata

Metadata

Assignees

Labels

MQThis issue is part of a "milestone of quality" initiative.test-enhancement

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions