You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by fm...@apache.org on 2026/03/27 17:38:22 UTC
(camel-spring-boot) branch fix-virtual-threads-optimized-test created (now 66dc4011b21)
This is an automated email from the ASF dual-hosted git repository.
fmariani pushed a change to branch fix-virtual-threads-optimized-test
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
at 66dc4011b21 Fix SpringBootPlatformHttpVirtualThreadsOptimizedTest for Spring Boot 4.0.4
This branch includes the following new commits:
new 66dc4011b21 Fix SpringBootPlatformHttpVirtualThreadsOptimizedTest for Spring Boot 4.0.4
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(camel-spring-boot) 01/01: Fix SpringBootPlatformHttpVirtualThreadsOptimizedTest for Spring Boot 4.0.4
Posted by fm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
fmariani pushed a commit to branch fix-virtual-threads-optimized-test
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
commit 66dc4011b21d329967777f70b09e2c91f5f86f8a
Author: Croway <fe...@gmail.com>
AuthorDate: Fri Mar 27 18:38:08 2026 +0100
Fix SpringBootPlatformHttpVirtualThreadsOptimizedTest for Spring Boot 4.0.4
Spring Boot 4.0.4's TaskExecutionAutoConfiguration uses
@ConditionalOnMissingBean(Executor.class) when auto-configuring the
SimpleAsyncTaskExecutor for virtual threads. When another Executor bean
is registered first (e.g. by Spring Security auto-configuration), the
auto-config backs off and no SimpleAsyncTaskExecutor is created, causing
the test assertion to fail.
Explicitly define a SimpleAsyncTaskExecutor bean in the test's
TestConfiguration using SimpleAsyncTaskExecutorBuilder, matching the
approach used by the passing
SpringBootPlatformHttpMultipleExecutorsVirtualThreadsTest.
Co-Authored-By: Claude Opus 4.6 (1M context) <no...@anthropic.com>
---
.../SpringBootPlatformHttpVirtualThreadsOptimizedTest.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpVirtualThreadsOptimizedTest.java b/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpVirtualThreadsOptimizedTest.java
index ce3f3f09399..9062616088c 100644
--- a/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpVirtualThreadsOptimizedTest.java
+++ b/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpVirtualThreadsOptimizedTest.java
@@ -25,6 +25,7 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
+import org.springframework.boot.task.SimpleAsyncTaskExecutorBuilder;
import org.springframework.core.task.SimpleAsyncTaskExecutor;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.web.SecurityFilterChain;
@@ -61,6 +62,11 @@ public class SpringBootPlatformHttpVirtualThreadsOptimizedTest extends PlatformH
return http.build();
}
+ @Bean
+ public SimpleAsyncTaskExecutor simpleAsyncTaskExecutor(SimpleAsyncTaskExecutorBuilder simpleAsyncTaskExecutorBuilder) {
+ return simpleAsyncTaskExecutorBuilder.build();
+ }
+
@Bean
public RouteBuilder servletPlatformHttpRouteBuilder() {
return new RouteBuilder() {