Stop setting a thread name prefix for externally defined Executors

This commit updates the WebSocket message broker configuration to stop
setting a thread name prefix for externally defined Executors.

This used to apply to:

* clientInboundChannel with a thread name prefix of
"clientInboundChannel-".
* clientOutboundChannel with a thread name prefix of
"clientOutboundChannel-".
* brokerChannel with a thread name prefix of "brokerChannel-".

Closes gh-32132
This commit is contained in:
Stéphane Nicoll
2024-01-26 11:46:34 +01:00
parent f526b23fd7
commit 0f707706f1
3 changed files with 19 additions and 5 deletions

View File

@@ -73,15 +73,14 @@ class ChannelRegistrationTests {
}
@Test
void taskRegistrationWithExistingThreadPoolTaskExecutor() {
void taskRegistrationWithExistingThreadPoolTaskExecutorDoesNotInvokeCustomizer() {
ThreadPoolTaskExecutor existingExecutor = mock(ThreadPoolTaskExecutor.class);
ChannelRegistration registration = new ChannelRegistration();
registration.taskExecutor(existingExecutor);
assertThat(registration.hasExecutor()).isTrue();
Executor executor = registration.getExecutor(this.fallback, this.customizer);
assertThat(executor).isSameAs(existingExecutor);
verifyNoInteractions(this.fallback);
verify(this.customizer).accept(executor);
verifyNoInteractions(this.fallback, this.customizer);
}
@Test