Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Improve Test Coverage for packages/web3/src/block #452 #467

Conversation

ShantelPeters
Copy link

@ShantelPeters ShantelPeters commented Nov 24, 2024

Additional tests

  1. BlockSubscription class (main implementation):

    • Testing the polling mechanism with different time intervals
    • Cache management and expiration
    • Handling of multiple chains in block responses
    • Error handling during polling
    • Missing blocks detection and handling
  2. BlockSubscriptionBase class:

    • Edge cases for undefined reorgCallback
    • Handling of invalid block structures
    • Parent hash calculation with edge cases
  3. Key scenarios that should be tested:

    • Timestamp handling (future timestamps, expired timestamps)
    • Network errors and retry behavior
    • Block ordering and sorting
    • Chain reorganization with various depths
    • Cache management with concurrent updates

Resolves #452

@ShantelPeters ShantelPeters marked this pull request as ready for review November 24, 2024 19:14
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.

Improve Test Coverage for packages/web3/src/block
2 participants