Migrate integration tests to eventcore-examples #280

Closed
opened 2026-01-01 10:10:55 -08:00 by jwilger · 0 comments
jwilger commented 2026-01-01 10:10:55 -08:00 (Migrated from github.com)

Summary

Migrate integration tests from individual crates to eventcore-examples and update them to use the projection-based testing pattern.

Context

Per ADR-031 and ADR-032:

  • Integration tests should verify results via projections (using EventCollector)
  • Integration tests belong in eventcore-examples crate
  • Unit tests stay inline with source code

Tests to Migrate

From eventcore/tests/:

  • I-001-single_stream-command_test.rs
  • I-003-retry_policy_test.rs
  • I-004-multi_stream_atomic_test.rs
  • I-007-dynamic_stream_discovery_test.rs
  • projection_runner_test.rs
  • projection_event_retry_config_test.rs
  • projection_poll_retry_test.rs

From eventcore-macros/tests/:

  • I-006-command_derive_macro_test.rs

Migration Steps per Test

  1. Move file to eventcore-examples/tests/
  2. Update imports to use public APIs only
  3. Replace store.read_stream() with EventCollector + run_projection()
  4. Verify test still passes

Dependencies

  • #278 - EventCollector must be implemented first
  • #279 - eventcore-examples crate must exist first

Parent Issue

Sub-issue of #272

## Summary Migrate integration tests from individual crates to `eventcore-examples` and update them to use the projection-based testing pattern. ## Context Per ADR-031 and ADR-032: - Integration tests should verify results via projections (using `EventCollector`) - Integration tests belong in `eventcore-examples` crate - Unit tests stay inline with source code ## Tests to Migrate From `eventcore/tests/`: - `I-001-single_stream-command_test.rs` - `I-003-retry_policy_test.rs` - `I-004-multi_stream_atomic_test.rs` - `I-007-dynamic_stream_discovery_test.rs` - `projection_runner_test.rs` - `projection_event_retry_config_test.rs` - `projection_poll_retry_test.rs` From `eventcore-macros/tests/`: - `I-006-command_derive_macro_test.rs` ## Migration Steps per Test 1. Move file to `eventcore-examples/tests/` 2. Update imports to use public APIs only 3. Replace `store.read_stream()` with `EventCollector` + `run_projection()` 4. Verify test still passes ## Dependencies - #278 - EventCollector must be implemented first - #279 - eventcore-examples crate must exist first ## Parent Issue Sub-issue of #272
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jwilger/eventcore#280
No description provided.