Test-library fixes: overridable kernel start timeout, and a batching-proof diagnostic assertion - #103
Open
thomasjm wants to merge 2 commits into
Open
Test-library fixes: overridable kernel start timeout, and a batching-proof diagnostic assertion#103thomasjm wants to merge 2 commits into
thomasjm wants to merge 2 commits into
Conversation
thomasjm
force-pushed
the
rust-data-science-start-timeout
branch
from
August 28, 2026 08:21
6aae2c0 to
c684682
Compare
thomasjm
force-pushed
the
rust-data-science-start-timeout
branch
from
August 28, 2026 22:47
c684682 to
918e9a5
Compare
thomasjm
force-pushed
the
rust-data-science-start-timeout
branch
from
August 29, 2026 00:10
918e9a5 to
5de4b61
Compare
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.
Two test-library changes, after splitting the Rust startup problem out to #105.
Overridable kernel start timeout
--start-timeoutwas hardcoded at 120 inrunKernelCode.runKernelCodeandnotebookShouldSatisfynow take it,defaultStartTimeout = 120keeps every existing callerunchanged, and
testKernelSucceeds'is there for kernels that legitimately need longer.Nothing uses the override yet. The case that motivated it — the Rust data science kernel spending
~115s compiling crates on every start — is better fixed by not doing the work at all, which is #105.
Raising the global default instead would have made every hung kernel take five times longer to
report, so the machinery is worth having either way.
test.rs with missing struct fieldFails in CI, passes locally. Two sources publish diagnostics for that file and only one of them is
dependable, so the test asserts on that one:
rustc's diagnostic, via flycheck, was identical in every run I did. rust-analyzer's own two
(
non_upper_case_globalsand its ownE0063) come and go: in some runs it never links the detachedfile into the crate graph and publishes none of its own at all. I confirmed that by running with an
assertion that never matches, so the watcher stays up for the whole timeout — one run published
[],[],[rustc]and then nothing further for 60s.Asserting the full set therefore can't be stable however it's gathered, and it isn't a question of
waiting longer. Filtering by source keeps the assertion exact — an unexpected or missing rustc
diagnostic still fails it — while dropping coverage we didn't really have.
publishDiagnosticscarries the complete set per URI and replaces the previous one, so there's nopartial state to accumulate;
lsp-testalready tracks the current set. The variability is in whatthe server publishes, not in how we collect it.
Testing
Compiles clean, and the test passes. Checked it isn't vacuous: adding a diagnostic to the expected
list that no server publishes makes it fail, as it should.
Note
This no longer touches
Spec/Tests/Rust.hs, so it won't conflict with #105. It also no longer fixesrust -- use polars...on its own — #105 does that.