Repository navigation
test(e2e): calibrate the long-query fixture to the host instead of a fixed size - #226
Merged
Merged
Conversation
…fixed size agent_receives_deltas_while_its_own_long_query_runs failed on the 4-vCPU CI runner with 'fixture too fast to show blocking' (472 ms at #214, 469 ms at 55ec34d): the fixed side-14 bipartite graph is too small for that host. The engine is unchanged in speed and the query result is correct (empty). The test now probes TRIANGLES and grows the graph until it runs for twice LONG_QUERY on the host at hand. DELTA_BUDGET and every assertion are unchanged.
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.
Problem
The full-suite release checkpoint (run 37178372590, job Tests (full)) fails one test:
reactive::agent_receives_deltas_while_its_own_long_query_runspanics withfixture too fast to show blocking: 469.349585ms.Why the query ran only ~469 ms
The runner is faster than the fixed fixture assumed. No engine change caused it.
?edge(X, Y), edge(Y, Z), edge(Z, X)on one connection take the same time (side 14: 720/647/647 ms; side 20: 3.3/2.97/2.97 s), and each correctly returns 0 rows. A bipartite graph has no odd cycle, so the query is fast for no correctness reason.tests/ws_pipeline_tests.rs) uses side 20 for release builds; this e2e test used side 14, about 3–5× less work. The join cost grows faster than side³ (local: 14 → ~0.65 s, 20 → ~3.0 s, 24 → ~6.5 s). That leaves ~0.47 s on the CI runner, just underLONG_QUERY(500 ms).Fix
The test now calibrates the fixture to the host instead of using a fixed size:
calibrate_long_queryrunsTRIANGLESon a probe connection. Until it takes at least 2 ×LONG_QUERY, it grows the side by the cube root of the shortfall, commits the extra edges and probes again. A deadline-exceeded probe counts as long enough. The side is capped at 64, and if the cap is hit the test fails loudly.bipartite_triangles_<side>).Not changed:
DELTA_BUDGET(250 ms), the delta latency assertion,ran >= LONG_QUERY, the delta-before-result ordering check and the empty-result check. The cancel test reuses the same base fixture (side 14) without calibration, since it only needs the query to outlive 100 ms.Validation
make e2e-reactive×5 locally: 14/14 passed each run. Calibration settled on side 16 every time, and writer-to-delta latency was 1.6–2.3 ms.cargo clippy --release --test e2e_reactive -D warningsandcargo fmt --checkare clean.