Skip to content

Add response_delay_seconds to Flask mock#2915

Merged
adamtheturtle merged 6 commits intomainfrom
adamtheturtle/flask-response-delay
Feb 15, 2026
Merged

Add response_delay_seconds to Flask mock#2915
adamtheturtle merged 6 commits intomainfrom
adamtheturtle/flask-response-delay

Conversation

@adamtheturtle
Copy link
Member

@adamtheturtle adamtheturtle commented Feb 15, 2026

Summary

  • Add response_delay_seconds setting to the Flask mock (VWSSettings and VWQSettings) for testing timeout handling
  • Settings are configurable via RESPONSE_DELAY_SECONDS environment variable
  • Mirrors the existing response_delay_seconds parameter in MockVWS
  • Adds two tests verifying default behavior (no delay) and delay application

🤖 Generated with Claude Code


Note

Low Risk
Default behavior is unchanged (0.0 delay) and the change is isolated to test/mock server response timing; main risk is unintended slowdown if the env var is set in CI or user environments.

Overview
Adds a new response_delay_seconds setting to the Flask-based mocks (VWSSettings and VWQSettings) and applies it via after_request hooks to sleep before returning responses, enabling simulation of slow servers via the RESPONSE_DELAY_SECONDS environment variable.

Updates tooling/config (pyproject.toml vulture decorator ignores, CHANGELOG.rst) and adds tests that assert the default behavior has no delay and that a configured delay increases request duration.

Written by Cursor Bugbot for commit 0e09b21. This will update automatically on new commits. Configure here.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@adamtheturtle adamtheturtle merged commit 69412b1 into main Feb 15, 2026
13 checks passed
@adamtheturtle adamtheturtle deleted the adamtheturtle/flask-response-delay branch February 15, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant