Repository navigation
Create the API tests' backtests one at a time - #10237
Merged
Merged
Conversation
The parallel project tests start about 20 backtest creates at once. The api
handles a user's creates one at a time and refuses one that waits too long
("Too many concurrent requests"), which fails the tests with a null reference.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The api handles a user's creates one at a time anyway, and a waiting create only polls the lock once a second for 30 to 60 seconds, so even 6 in flight can run out of time when the creates are slow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Martin-Molinero
force-pushed
the
bug-api-tests-throttle-backtest-creates
branch
from
November 25, 2026 17:33
5b76c6b to
7810eb9
Compare
sparx82
added a commit
to sparx82/Lean
that referenced
this pull request
Nov 26, 2026
Create the API tests' backtests one at a time (QuantConnect#10237)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The master API Tests fail intermittently, for example run 45620934701.
Api.CreateBacktestthrows aNullReferenceExceptionatApi.cs:366.Cause: since #10149,
ProjectTestsruns in parallel and starts about 20 backtest creates at once. The API handles a user's creates one at a time. A create that waits too long for its turn is refused with "Too many concurrent requests; please slow down" and returns no backtest. A waiting create only retries for 30 to 60 seconds.Fix: the tests go through a new
ApiTestBase.CreateBacktestthat creates one backtest at a time. Only the create call is serialized, not compiling or waiting for the backtest to finish. Since the API already handles a user's creates one at a time, this shouldn't slow the run down.🤖 Generated with Claude Code