Repository navigation
Migrate core data-driven tests to @ObjectSource/@TableSource - #295
Merged
Merged
Conversation
…o data-driven family Phase 2 of #271, scoped to genuinely data-driven tests in core. Files where each @test was a unique scenario (single-shape, structured fixtures) are deliberately left as @test — forcing them into @ObjectSource adds string dispatch without revealing intent. Migrated: - 8 SerializationTests (Database, Datastore, Table, EdgeSchema, V2Alias, V2Label, V2Service, V2Storage) — symmetric serialize / deserialize pairs plus a few V2-to-V3 conversion variants. Test counts preserved per file. - AliasSerializationTest pilot updated for consistency with the others. - EdgeMutationStrategyTest — 4 @nested matrices (DirectedSource, DirectedTarget, CountRecordOnDelete, CountRecordsOnUpdate) collapse to one @TableSource each; 2x2/4x1 layouts surface the design contract side-by-side. 15 to 15 cases. - PrettyObjectWriterTest — only the sort=true/false pairs (4 to 2 methods, same case count); the rest stay as @test (heterogeneous writer configs or one-off scenarios). Conventions adopted in this batch: - JSON-flow YAML for descriptor/expected objects (curly-brace flow style embedded in YAML), since these descriptors travel as JSON over HTTP. - PrettyObjectWriter.DEFAULT in place of the repeated PrettyObjectWriter(indentSize = 2, lineLengthLimit = 80) constructor (per #291 Phase 0 findings). - Pipe rows whose cells contain colons are wrapped in single-quoted YAML scalars so the YAML parser does not read them as flow mappings. Skipped (added to "Out of scope (this PR)" with reasons): - 3 single-@test scenarios (KotlinCoreJvmRuntimeTest, ApiTestExtensionsTest, EdgeBulkMutationRequestTest) — not data-driven. - 3 multi-@test files (EdgeMutationBuilderTest, EdgeCacheRecordMapperTest, V2MultiEdgeBulkLoadTest) — heterogeneous assertion shapes per case. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
3 tasks done
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
Phase 2 of #271. Migrate the genuinely data-driven
coretests; document why six files stay as@Test.Refs #271
Changes
EdgeMutationStrategyTest(15 → 15, 4@Nestedmatrices → 4@TableSource);PrettyObjectWriterTestsort=true/falsepairs only.PrettyObjectWriter.DEFAULTreplaces the repeated constructor (Pilot @ObjectSource/@TableSource migration across all three phases #291 finding); pipe rows containing:are single-quoted to keep YAML from reading them as flow mappings.@Test(added to Migrate Kotlin data-driven tests to@ObjectSource#271 with reasons):KotlinCoreJvmRuntimeTest,ApiTestExtensionsTest,EdgeBulkMutationRequestTest(single-scenario, not data-driven);EdgeMutationBuilderTest,EdgeCacheRecordMapperTest,V2MultiEdgeBulkLoadTest(heterogeneous assertion shapes per case).How to Test
AI Assistance