Skip to content

Instantly share code, notes, and snippets.

@aldobongio
Created November 2, 2023 15:57
Show Gist options
  • Save aldobongio/f4811bddd38043c7c592817ab397be16 to your computer and use it in GitHub Desktop.
Save aldobongio/f4811bddd38043c7c592817ab397be16 to your computer and use it in GitHub Desktop.
bucket4j Jedis snippet outcome
=========================
Setting bandwith to 5/min
Attempt to consume 5
Attempt to consume 1
Update configuration to 10/min using strategy PROPORTIONALLY
Sleeping 60+ seconds in order to refill all tokens
Attempt to consume 10
Attempt to consume 1
=========================
Setting bandwith to 5/min
Attempt to consume 5
Attempt to consume 1
Update configuration to 10/min using strategy AS_IS
Sleeping 60+ seconds in order to refill all tokens
Attempt to consume 10
Attempt to consume 1
=========================
Setting bandwith to 5/min
Attempt to consume 5
Attempt to consume 1
Update configuration to 10/min using strategy RESET
Sleeping 60+ seconds in order to refill all tokens
Attempt to consume 10
Unexpected outcome: was false but expecting true
Attempt to consume 1
Unexpected outcome: was true but expecting false
=========================
Setting bandwith to 5/min
Attempt to consume 5
Attempt to consume 1
Update configuration to 10/min using strategy ADDITIVE
Sleeping 60+ seconds in order to refill all tokens
Attempt to consume 10
Unexpected outcome: was false but expecting true
Attempt to consume 1
Unexpected outcome: was true but expecting false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment