Skip to content

Fix integration test retry timing for eventual consistency#14

Merged
arshka merged 1 commit intomainfrom
fix/integration-test-retry-timing
Mar 19, 2026
Merged

Fix integration test retry timing for eventual consistency#14
arshka merged 1 commit intomainfrom
fix/integration-test-retry-timing

Conversation

@arshka
Copy link
Owner

@arshka arshka commented Mar 19, 2026

Summary

  • Increased _eventually_fetch default timeout from 3s to 30s and interval from 0.25s to 5s in tests/integration/test_portfolio.py
  • Fixes test_get_order_by_id which was failing because the Kalshi query-exchange service has eventual consistency and 3 seconds wasn't enough time for newly placed orders to become fetchable by ID

Test plan

  • Run pytest tests/integration/test_portfolio.py::TestOrderMutations::test_get_order_by_id -v and verify it passes consistently
  • Run full integration suite pytest tests/integration/ -v to confirm no regressions

🤖 Generated with Claude Code

The _eventually_fetch helper defaulted to 3s timeout / 0.25s interval,
which wasn't enough for the Kalshi query-exchange service to index
newly placed orders. Bumped to 30s / 5s to handle API propagation delay.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@arshka arshka merged commit 7a3a10f into main Mar 19, 2026
6 checks passed
@arshka arshka deleted the fix/integration-test-retry-timing branch March 19, 2026 00:34
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