Skip to content

Conversation

@fbac
Copy link
Collaborator

@fbac fbac commented Oct 10, 2025

Add state and transition tests for pkg/payerreport/workers.SubmitterWorker and adjust logging in pkg/payerreport.PayerReportVerifier.isAtMinuteEnd

This pull request adds a mock for pkg/blockchain.PayerReportsManager, introduces a test suite for pkg/payerreport/workers.SubmitterWorker state transitions, updates integration tests to use eventual assertions around report generation, preallocates a results map in pkg/payerreport.Store conversion, and changes the log level in pkg/payerreport.PayerReportVerifier.isAtMinuteEnd when the expected sequence is not the minute end.

  • Generate PayerReportsManager mock to support worker tests in mock_PayerReportsManager.go and include interface in .mockery.yaml
  • Add state transition tests for SubmitterWorker covering valid and invalid outcomes in submitter_test.go
  • Wrap GenerateReports in require.Eventually for integration reliability in integration_test.go
  • Preallocate map capacity in payerreport.Store row conversion in store.go
  • Log errors instead of info in payerreport.PayerReportVerifier.isAtMinuteEnd in verifier.go

📍Where to Start

Start with the SubmitterWorker tests in submitter_test.go, then review the PayerReportsManager mock in mock_PayerReportsManager.go and the verifier change in verifier.go.


📊 Macroscope summarized 9243587. 1 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted

🗂️ Filtered Issues

No issues evaluated.

@fbac fbac requested a review from a team as a code owner October 10, 2025 11:31
@graphite-app
Copy link

graphite-app bot commented Oct 10, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • Queue - adds this PR to the back of the merge queue
  • Hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@fbac fbac force-pushed the 10-09-submitter_tests branch from 1f9e6dd to 183207a Compare October 10, 2025 11:32
@fbac fbac force-pushed the 10-09-submitter_tests branch from 183207a to 61bc15c Compare October 10, 2025 11:35
@fbac fbac force-pushed the 10-09-submitter_tests branch from 61bc15c to 269af44 Compare October 10, 2025 13:53
@fbac fbac force-pushed the 10-09-submitter_tests branch from e515b28 to 9243587 Compare October 10, 2025 15:15
@fbac fbac merged commit 0ef33da into main Oct 10, 2025
11 of 12 checks passed
@fbac fbac deleted the 10-09-submitter_tests branch October 10, 2025 15:46
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.

3 participants