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

Fix rate remaining header value for Redis repository #279

Merged
merged 18 commits into from
Jan 17, 2020
Merged

Fix rate remaining header value for Redis repository #279

merged 18 commits into from
Jan 17, 2020

Conversation

vasilaio
Copy link
Contributor

@vasilaio vasilaio commented Jan 3, 2020

Fixes #273

Changes proposed in this pull request:

  • Assigned the current value on the first call (when setIfAbsent operation returns 'true')

vasilaio and others added 12 commits November 30, 2019 18:44
Conflicts:
	spring-cloud-zuul-ratelimit-core/src/main/java/com/marcosbarbero/cloud/autoconfigure/zuul/ratelimit/config/repository/RedisRateLimiter.java
	spring-cloud-zuul-ratelimit-core/src/test/java/com/marcosbarbero/cloud/autoconfigure/zuul/ratelimit/config/repository/RedisRateLimiterTest.java
Bump infinispan.version from 10.0.1.Final to 10.1.0.Final (#271)
marcosbarbero
marcosbarbero previously approved these changes Jan 13, 2020
marcosbarbero
marcosbarbero previously approved these changes Jan 13, 2020
@marcosbarbero
Copy link
Owner

For some reason, Travis is not breaking in the IT tests, but the test on RedisApplicationTestIT.testNotExceedingCapacityRequest is breaking.

Scroll all the way down to the bottom of the raw logs and you'll see it.

@vasilaio
Copy link
Contributor Author

It fails because I used an existing service path in my test. So if my test runs before testNotExceedingCapacityRequest test, the limit refresh interval did not end and we get 429. This failure depends on the order of execution. You ca reproduce it by commenting all the tests except testNotExceedingCapacityRequest and testShouldReturnCorrectRateRemainingValue.

@coveralls
Copy link

coveralls commented Jan 16, 2020

Coverage Status

Coverage increased (+0.01%) to 95.804% when pulling bea8fee on vasilaio:gh-273 into 9eadf0e on marcosbarbero:master.

@marcosbarbero marcosbarbero merged commit 47c45d5 into marcosbarbero:master Jan 17, 2020
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.

First api call doesn't have correct rate limit remaining value with Redis repository
3 participants