Skip to content

#643 Fix flaky tests for throttling pattern#752

Merged
iluwatar merged 2 commits intoiluwatar:masterfrom
christophercolumbusdog:master
May 27, 2018
Merged

#643 Fix flaky tests for throttling pattern#752
iluwatar merged 2 commits intoiluwatar:masterfrom
christophercolumbusdog:master

Conversation

@christophercolumbusdog
Copy link
Contributor

I took a look at the Travis logs and the troublesome test. From examining the code and tinkering around, my best guess is that in the Travis environment, the threat that resets the API access limit may prematurely reset the count, making the assertion fail.

I have instead changed the throttler to be an empty implementation (to avoid any unintended resets, which is not the point of the test). Additionally, I changed it to an assertEquals so that in the event of another failure, we can see exactly what the counter ended up being, which will help with debugging.

@iluwatar iluwatar merged commit c713dbc into iluwatar:master May 27, 2018
@iluwatar
Copy link
Owner

Thanks @christophercolumbusdog for looking into this. Let's merge the fix candidate and see how it behaves.

@npathai
Copy link
Contributor

npathai commented May 27, 2018

@christophercolumbusdog Thanks for the fix 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants