Skip to content

SimplePool setPoolSize incorrectly updates internal fields #3143

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
sergebg opened this issue Jan 15, 2020 · 1 comment
Closed

SimplePool setPoolSize incorrectly updates internal fields #3143

sergebg opened this issue Jan 15, 2020 · 1 comment

Comments

@sergebg
Copy link
Contributor

sergebg commented Jan 15, 2020

Bug report

When new pool size is less then existing, setPoolSize() method breaks consistency.
This happens when CachingSessionFactory is constructed using the most "convenient" constructor CachingSessionFactory(SessionFactory<F> sessionFactory). In this case initial poolSize=Integer.MAX_VALUE. And so when later we are trying to setup some other value, the pool object becomes broken.

garyrussell added a commit to garyrussell/spring-integration that referenced this issue Jan 16, 2020
- use preferred assertJ expected exception checking
- add a test for reducing a partially allocated pool
garyrussell added a commit to garyrussell/spring-integration that referenced this issue Jan 16, 2020
- use preferred assertJ expected exception checking
- add a test for reducing a partially allocated pool
- check active counts
garyrussell added a commit to garyrussell/spring-integration that referenced this issue Jan 16, 2020
- use preferred assertJ expected exception checking
- add a test for reducing a partially allocated pool
- check active counts
garyrussell pushed a commit that referenced this issue Jan 16, 2020
Resolves spring-projects/spring-amqp#1142

Resize down does not work when not enough already allocated to match the reduction.

Improved SimplePool test cases and fixed code style

Fixed code style

GH-3143: Test Polishing

- use preferred assertJ expected exception checking
- add a test for reducing a partially allocated pool
- check active counts
garyrussell pushed a commit that referenced this issue Jan 16, 2020
Resolves spring-projects/spring-amqp#1142

Resize down does not work when not enough already allocated to match the reduction.

Improved SimplePool test cases and fixed code style

Fixed code style

GH-3143: Test Polishing

- use preferred assertJ expected exception checking
- add a test for reducing a partially allocated pool
- check active counts
@artembilan
Copy link
Member

Fixed via dba307a

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

Successfully merging a pull request may close this issue.

2 participants