Back to Source Monitor

Split FeedFetcherTest into Concern-Based Classes

.vbw-planning/milestones/aia-ssl-fix/02-test-performance/PLAN-01-SUMMARY.md

0.13.01.6 KB
Original Source

What Was Built

Split the monolithic FeedFetcherTest (71 tests, 1350 lines, single class) into 6 independent test classes plus a shared helper module. Each file is independently runnable with PARALLEL_WORKERS=1. All 1033 tests pass, RuboCop zero offenses.

Test distribution:

  • FeedFetcherSuccessTest: 5 tests (RSS/Atom/JSON fetching, ETag/304, Netflix cassette)
  • FeedFetcherErrorHandlingTest: 13 tests (Faraday error wrapping, AIA resolution, failure recording)
  • FeedFetcherAdaptiveIntervalTest: 6 tests (interval increase/decrease, min/max bounds, disabled mode)
  • FeedFetcherRetryCircuitTest: 6 tests (retry state, circuit breaker, policy error handling)
  • FeedFetcherEntryProcessingTest: 8 tests (entry creation/update tracking, error normalization, digest fallbacks)
  • FeedFetcherUtilitiesTest: 33 tests (headers, jitter, metadata, signature, config helpers, parsing)

Files Modified

ActionPath
CREATEtest/lib/source_monitor/fetching/feed_fetcher_test_helper.rb
CREATEtest/lib/source_monitor/fetching/feed_fetcher_success_test.rb
CREATEtest/lib/source_monitor/fetching/feed_fetcher_error_handling_test.rb
CREATEtest/lib/source_monitor/fetching/feed_fetcher_adaptive_interval_test.rb
CREATEtest/lib/source_monitor/fetching/feed_fetcher_retry_circuit_test.rb
CREATEtest/lib/source_monitor/fetching/feed_fetcher_entry_processing_test.rb
CREATEtest/lib/source_monitor/fetching/feed_fetcher_utilities_test.rb
DELETEtest/lib/source_monitor/fetching/feed_fetcher_test.rb