Skip to content

Intermittent test failure in Throttling pattern #643

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

Closed
iluwatar opened this issue Sep 23, 2017 · 9 comments
Closed

Intermittent test failure in Throttling pattern #643

iluwatar opened this issue Sep 23, 2017 · 9 comments

Comments

@iluwatar
Copy link
Owner

See https://travis-ci.org/iluwatar/java-design-patterns/builds/278878833

@iluwatar
Copy link
Owner Author

Ping @rastdeepanshu

@rastdeepanshu
Copy link
Contributor

@iluwatar i'll take a look.

@iluwatar iluwatar reopened this Nov 5, 2017
@iluwatar
Copy link
Owner Author

@iluwatar iluwatar removed this from the 1.18.0 milestone Jan 1, 2018
@iluwatar
Copy link
Owner Author

@rastdeepanshu it still sometimes fails, will you try to solve it?

@rastdeepanshu
Copy link
Contributor

@iluwatar I'll take a look.

@iluwatar
Copy link
Owner Author

iluwatar commented Mar 7, 2018

@rastdeepanshu any progress?

@iluwatar
Copy link
Owner Author

Flaky test disabled in 17ea0b1. Still needs to be fixed.

christophercolumbusdog added a commit to christophercolumbusdog/java-design-patterns that referenced this issue May 26, 2018
iluwatar added a commit that referenced this issue May 27, 2018
#643 Fix flaky tests for throttling pattern
@iluwatar iluwatar added this to the 1.20.0 milestone May 27, 2018
@iluwatar
Copy link
Owner Author

iluwatar commented Jun 3, 2018

Unfortunately the fix did not work. See https://api.travis-ci.org/v3/job/384940670/log.txt. Reopening this issue.

@iluwatar iluwatar reopened this Jun 3, 2018
@iluwatar iluwatar removed this from the 1.20.0 milestone Jun 3, 2018
@npathai npathai self-assigned this Oct 15, 2018
npathai added a commit that referenced this issue Oct 15, 2018
…allsCount. Because AppTest was executed before B2BServiceTest, it scheduled 1 sec timer using ThrottleTimerImpl class. While resetting it used that global CallCount class reset() method, which reset all counters. So that causes thread safety issue because of unintended sharing of application state between test cases, which is not a good practice.
iluwatar pushed a commit that referenced this issue Oct 21, 2018
)

* Resolves #643, test cases failed due to presence of global state in CallsCount. Because AppTest was executed before B2BServiceTest, it scheduled 1 sec timer using ThrottleTimerImpl class. While resetting it used that global CallCount class reset() method, which reset all counters. So that causes thread safety issue because of unintended sharing of application state between test cases, which is not a good practice.

* Updated class diagram png and added UCLS file
@iluwatar iluwatar added this to the 1.21.0 milestone Oct 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants