Skip to content

oracle: improve test coverage and fix issues#21

Open
dnldd wants to merge 1 commit intobisoncraft:masterfrom
dnldd:oracle-fix-issues
Open

oracle: improve test coverage and fix issues#21
dnldd wants to merge 1 commit intobisoncraft:masterfrom
dnldd:oracle-fix-issues

Conversation

@dnldd
Copy link
Copy Markdown
Contributor

@dnldd dnldd commented Mar 18, 2026

  • Fix potential goroutine accumulation in diviner.publishUpdate by removing async fire-and-forget (would manifest under publish failures)
  • Extract fetchUpdatesTimeout constant (30s) for explicit fetch deadline management
  • Add context timeout to fetchUpdates to prevent indefinite blocking
  • Pass logger to fetchTracker for proper error reporting during ID space exhaustion
  • Enhance provider tests to verify meaningful quota tracking behavior (not just nil checks)
  • Add HTTP utility tests (http_test.go) for DoGet and StreamDecodeJSON covering error cases, edge cases
  • Implement comprehensive source provider tests (bitcore, firo, coingecko pro) with proper mocking
  • Replace shallow structure-existence tests with behavioral assertions (quota limits, consumption tracking)
  • Add TatumQuotaFetcher error propagation test validating HTTP errors are handled correctly
  • Improve CoinMarketCap and Tatum quota tests to verify tracking is enabled and values are meaningful

- Fix potential goroutine accumulation in diviner.publishUpdate by
  removing async fire-and-forget (would manifest under publish failures)
- Extract fetchUpdatesTimeout constant (30s) for explicit fetch deadline
  management
- Add context timeout to fetchUpdates to prevent indefinite blocking
- Pass logger to fetchTracker for proper error reporting during ID space
  exhaustion
- Enhance provider tests to verify meaningful quota tracking behavior
  (not just nil checks)
- Add HTTP utility tests (http_test.go) for DoGet and StreamDecodeJSON
  covering error cases, edge cases
- Implement comprehensive source provider tests (bitcore, firo,
  coingecko pro) with proper mocking
- Replace shallow structure-existence tests with behavioral assertions
  (quota limits, consumption tracking)
- Add TatumQuotaFetcher error propagation test validating HTTP errors
  are handled correctly
- Improve CoinMarketCap and Tatum quota tests to verify tracking is
  enabled and values are meaningful
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant