Skip to content

Refactor Lettuce connection handling in integration tests #2575

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
mp911de opened this issue May 9, 2023 · 0 comments
Closed

Refactor Lettuce connection handling in integration tests #2575

mp911de opened this issue May 9, 2023 · 0 comments
Assignees
Labels
type: task A general task

Comments

@mp911de
Copy link
Member

mp911de commented May 9, 2023

Right now, the Surefire shutdown times out due to heavy connection cleanup via the shutdown hooks. In a regular test run, we retain about 2000 open Redis connections. The cleanup requires a significant amount of time.

We should:

  • Reuse pooled connections as much as possible (LettuceReactiveCommandsTestSupport causes a lot of connections)
  • Revisit our method source caching to cache input parameters. right now, we create fixtures (and therefor pools) for each method via @ParameterizedRedisTest
  • Release resources via method source retrieval to close resources early on
  • Reuse shared ClientResources
  • Use SimpleAsyncTaskExecutor as default utility in ClusterCommandExecutor
@mp911de mp911de added the type: task A general task label May 9, 2023
@mp911de mp911de added this to the 3.0.6 (2022.0.6) milestone May 9, 2023
@mp911de mp911de self-assigned this May 9, 2023
mp911de added a commit that referenced this issue May 9, 2023
Delegate RedisClientProvider.getClient() across connection providers. Use SimpleAsyncTaskExecutor as default in ClusterCommandExecutor to avoid ThreadPoolTaskExecutor pollution.

See #2575
@mp911de mp911de closed this as completed in 5e2b668 May 9, 2023
mp911de added a commit that referenced this issue May 9, 2023
Delegate RedisClientProvider.getClient() across connection providers. Use SimpleAsyncTaskExecutor as default in ClusterCommandExecutor to avoid ThreadPoolTaskExecutor pollution.

See #2575
mp911de added a commit that referenced this issue May 9, 2023
Reuse condition objects in command and version condition extensions.

Shut down ClientResources via ShutdownQueue and ensure shared client resources usage.

Add close support to our MethodArgumentsProvider. Reuse LettuceTestClientConfiguration for test client config settings.

Closes #2575
mp911de added a commit that referenced this issue May 11, 2023
Widen test assertions to avoid double rounding errors failing the test.

See #2575
mp911de added a commit that referenced this issue May 11, 2023
Widen test assertions to avoid double rounding errors failing the test.

See #2575
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

No branches or pull requests

1 participant