Skip to content

Reframe resource usage test to measure remote response times#32

Draft
ian-flores wants to merge 1 commit intomainfrom
fix-resource-load-test
Draft

Reframe resource usage test to measure remote response times#32
ian-flores wants to merge 1 commit intomainfrom
fix-resource-load-test

Conversation

@ian-flores
Copy link
Collaborator

Summary

Fixes #25test_resources_under_load was measuring local os.getloadavg() which caused false positives under parallel execution (xdist). The test now measures what actually matters: remote product performance.

Changes

  • Replaced local system checks with remote response time measurement under load
    • Generates concurrent API traffic to all configured products (4 workers, 10s)
    • Asserts p95 response time < 5s and error rate < 10%
  • Added Prometheus metrics check — validates /metrics endpoint returns 200 for each product
  • Updated .feature file with two new scenarios

Files changed

  • tests/performance/test_resource_usage.py
  • tests/performance/test_resource_usage.feature

…Prometheus check

- Replace local os.getloadavg() checks with remote response time measurement
- Generate concurrent API traffic to all products (4 workers, 10s duration)
- Assert p95 response time < 5s and error rate < 10%
- Add Prometheus metrics endpoint check (/metrics returns 200)
- Update .feature file with new scenarios

Fixes #25 - eliminates false positives from parallel test execution (xdist)
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://posit-dev.github.io/vip/pr-preview/pr-32/

Built to branch gh-pages at 2026-03-06 17:38 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

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.

test_resources_under_load false positive under parallel execution

1 participant