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

Use table driven tests for rate limiter query #2061

Closed
lumtis opened this issue Apr 22, 2024 · 0 comments · Fixed by #2060
Closed

Use table driven tests for rate limiter query #2061

lumtis opened this issue Apr 22, 2024 · 0 comments · Fixed by #2060
Assignees
Labels

Comments

@lumtis
Copy link
Member

lumtis commented Apr 22, 2024

Describe the Issue
As a follow for #2060

Using table driven tests would make the tests more maintainable, more visual and easier to add more as you can directly define how the cctx should be processed depending of a range of blocks

Expected Outcome
Using TDT that can look like:

testCase := {
  RateLimiterFlags: flags
  PendingCCTXs:
    0: [...] // cctxs per height
    1: [...]
    ...
    1000: [...]
  CurrentHeight: 1000
  ExpectedCCTXs: [...]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants