test: exercise engine snapshot updates under real parallelism - #60
Open
abdallahsamabd wants to merge 1 commit into
Open
test: exercise engine snapshot updates under real parallelism#60abdallahsamabd wants to merge 1 commit into
abdallahsamabd wants to merge 1 commit into
Conversation
abdallahsamabd
force-pushed
the
feat/test22
branch
from
September 1, 2026 14:56
a9247c7 to
8f0d95a
Compare
Signed-off-by: Abdallah Samara <abdallahsamabd@gmail.com>
abdallahsamabd
force-pushed
the
feat/test22
branch
from
September 1, 2026 17:49
8f0d95a to
922b076
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.
Summary
Adds concurrency coverage for the policy engine so registration, hot reload, and the route cache are exercised the way a host actually uses them: one
PolicyEnginebehindArc, invokes in flight, mutations on other threads.The engine already serializes writers with
runtime_write. This change does not touch that. It makes the test suite able to see real OS-thread overlap, assert that a successful register is not dropped, and check the generation / snapshotRelease/Acquirepairing.What changed
load_config/from_config, and the route cache now run with#[tokio::test(flavor = "multi_thread")].crates/ppe-core/tests/engine_concurrency.rs:Okmust still be visiblePPE_STRESS_SEED(optionalPPE_STRESS_OPS,PPE_STRESS_INVOKERS,PPE_STRESS_MUTATORS)crates/ppe-core/tests/loom_generation_snapshot.rs: if a readerAcquire-loads a higher generation, it must see the snapshot stored before theReleasebump..github/workflows/nightly-tsan.yml,make test-tsan) runs the stress tests under TSan. PR CI is unchanged.CONTRIBUTING.md: when a new test needsflavor = "multi_thread".Closes #22.
Test plan
cargo test -p praxis-policy-core --test engine_concurrency --test loom_generation_snapshotcargo test -p praxis-policy-core --libPPE_STRESS_SEED=12345 cargo test -p praxis-policy-core --test engine_concurrency stress_invoke -- --nocapturemake test) stays green; TSan is nightly-only