Skip to content

Conversation

@jondeweydev
Copy link
Collaborator

@jondeweydev jondeweydev commented Jul 14, 2022

Summary

Took TokenBucket tests as a template and added/removed a few tests specific to each limiting algorithm, respectively.

Type of Change

  • New feature (non-breaking change which adds functionality)

Issues

#70

@jondeweydev
Copy link
Collaborator Author

I am going to set all the tests to skip so that Travis does not fail on this PR

Copy link
Collaborator

@shalarewicz shalarewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests seems reasonable for the most part. I think that they can benefit from

  • additional assertions for success on the rate limiter response,
  • clearer test names (e.g. fixed window is full => previous window is full)
  • some additional tests for edge cases unique to sliding window.

There's a good chance I misinterpreted one of the tests. If you disagree/have questions let me know and we can discuss in person.

Good work!

Copy link
Contributor

@evanmcneely evanmcneely left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not go through all the math involved to check the expected results of the overlapping sliding window tests. This looks thorough and and covers all cases I can think about.

Copy link
Collaborator

@shalarewicz shalarewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Great work. This should give us pretty thorough coverage.

@jondeweydev jondeweydev merged commit 3f9ad17 into dev Jul 25, 2022
@jondeweydev
Copy link
Collaborator Author

Closes #78

@jondeweydev jondeweydev deleted the jd/slideTest branch July 25, 2022 22:59
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.

4 participants