Repository navigation
test: one tests/common crate and backend conformance suites - #344
Merged
Merged
Conversation
A tests/common dev-dependency crate holds the single Todo aggregate, read models, sessions, TempDb, PostgresTestSchema, env helpers and the conformance suites. Repository, lease, lock and schedule contracts run one identical case list per backend; exclusions are named capabilities that must be stated explicitly. The #[path] support idiom is gone from tests/. typed_commands fixtures use projection!/mutation! and assert typed error kinds (GraphqlServiceBindError is now an enum). Implements [[tasks/v5-review-27]]
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
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.
Task 27 stage B ([[tasks/v5-review-27]]): one fixture library and one conformance pattern.
What changed
tests/commonis apublish = falseworkspace crate. It is a path dev-dependency ofdistributed, which forwards itssqlite/postgres/graphqlfeatures. The dev-dependency cycle compiles, and thedistributedtypes are the same in both crates.commonholds:todo::Todosqlite::TempDbandpostgres::PostgresTestSchemaenv,ids,outbox,commands,graphql(on_each_dialect!,with_repository!),oidcandtransport(bus_conformance_tests!)#[path]left intests/: unit tests insrcusecommon::env.open(case)returnsNonewhen the service is missing, which skips the test.trueorfalse. Claiming a capability without implementing its trait does not compile.typed_commands:projection!+mutation!. Three stay hand-built because they assign constants (an enum variant, null), whichmutation!can't express.GraphqlServiceBindErroris now an enum with unchangedDisplaytext.Case lists (before → after)
sql_faults,durablecontrolled_clock,standalone_migrationsettle_faults,store_clockCounts and size
--list): 2,853 → 2,874.Tests
Run locally:
--all-targets: OK.make test-local --no-fail-fast(Postgres and compose services): 2,858 passed, 0 failed.--include-ignored: 341 passed. e2e-celld: 31 passed. e2e-uici-offline: OK.gateway-native;gateway-portablenative and wasm32;gateway-workerand the celld workers on wasm32; the domain check. All OK.Not done
deliver_at: it reads back about 76 ns off even for a whole-millisecond timestamp, which looks like a float conversion on the read path. The restart case, newly run on Postgres, now compares to within 1 ms. Filed as an incident; the fix belongs insrc.tests/support/rustc_fail.rsis still#[path]-included by the two proc-macro crates, which shouldn't depend on the runtime crate.tests/gateway_supportis still a per-binary module withdead_codeallowed.sourced_snapshotvariants are not folded intocommon.rust-cacheto CI.