Current Status
The EventExample integration test is currently skipped in CI.
Skip Reason
Concurrent event handlers have non-deterministic output order.
Problem Description
The EventExample demonstrates ARO's event system with multiple concurrent event handlers. When events are emitted, handlers execute in parallel via Swift's TaskGroup, resulting in:
- Non-deterministic execution order
- Output lines appearing in different orders between runs
- Platform-dependent scheduling behavior
What Must Be Done to Enable
Option 1: Use occurrence-check mode (Recommended)
- Add
occurrence-check: true to test.hint
- This allows lines to appear in any order as long as all expected lines are present
- Works well for event-driven code with concurrent handlers
Option 2: Refactor to sequential execution
- Modify the example to execute handlers sequentially
- Less representative of real event-driven behavior
- Not recommended as it changes the example's purpose
Option 3: Output aggregation
- Collect all handler outputs and sort before comparing
- Requires runtime changes to aggregate event handler outputs
Option 4: Statistical testing
- Run multiple times and ensure output contains expected content
- More complex test infrastructure needed
Recommended Fix
# In Examples/EventExample/test.hint
mode: interpreter
occurrence-check: true
Then regenerate expected.txt with unique identifying lines.
Files
Examples/EventExample/main.aro
Examples/EventExample/test.hint
Examples/EventExample/expected.txt
Labels
integration-test, events, concurrency
Current Status
The
EventExampleintegration test is currently skipped in CI.Skip Reason
Concurrent event handlers have non-deterministic output order.
Problem Description
The EventExample demonstrates ARO's event system with multiple concurrent event handlers. When events are emitted, handlers execute in parallel via Swift's TaskGroup, resulting in:
What Must Be Done to Enable
Option 1: Use occurrence-check mode (Recommended)
occurrence-check: trueto test.hintOption 2: Refactor to sequential execution
Option 3: Output aggregation
Option 4: Statistical testing
Recommended Fix
Then regenerate expected.txt with unique identifying lines.
Files
Examples/EventExample/main.aroExamples/EventExample/test.hintExamples/EventExample/expected.txtLabels
integration-test, events, concurrency