Commit f9e463b
Add createSingletonService() to 32 test-infra service factories
Add a createSingletonService() method to all test-infra service
factories. These return a JVM-wide singleton instance backed by
SingletonService, which prevents duplicate container startups when
multiple test classes share the same service (especially useful for
parallel test execution via mvnd).
Each factory's singleton wrapper delegates all service-specific
interface methods to the underlying service instance.
Also change SingletonService.shutdown() from throwing
IllegalArgumentException to a debug-level no-op, since JUnit's
@RegisterExtension lifecycle calls shutdown() after each test class.
The actual cleanup happens via JVM shutdown hook.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent c9c34a1 commit f9e463b
33 files changed
Lines changed: 1226 additions & 2 deletions
File tree
- components/camel-spring-parent/camel-spring-rabbitmq/src/test/java/org/apache/camel/component/springrabbit/test/infra/services
- test-infra
- camel-test-infra-azure-storage-blob/src/main/java/org/apache/camel/test/infra/azure/storage/blob/services
- camel-test-infra-azure-storage-datalake/src/main/java/org/apache/camel/test/infra/azure/storage/datalake/services
- camel-test-infra-azure-storage-queue/src/main/java/org/apache/camel/test/infra/azure/storage/queue/services
- camel-test-infra-cassandra/src/main/java/org/apache/camel/test/infra/cassandra/services
- camel-test-infra-chatscript/src/main/java/org/apache/camel/test/infra/chatscript/services
- camel-test-infra-cli/src/main/java/org/apache/camel/test/infra/cli/services
- camel-test-infra-common/src/main/java/org/apache/camel/test/infra/common/services
- camel-test-infra-consul/src/main/java/org/apache/camel/test/infra/consul/services
- camel-test-infra-docling/src/main/java/org/apache/camel/test/infra/docling/services
- camel-test-infra-google-pubsub/src/main/java/org/apache/camel/test/infra/google/pubsub/services
- camel-test-infra-hashicorp-vault/src/main/java/org/apache/camel/test/infra/hashicorp/vault/services
- camel-test-infra-hazelcast/src/main/java/org/apache/camel/test/infra/hazelcast/services
- camel-test-infra-ibmmq/src/main/java/org/apache/camel/test/infra/ibmmq/services
- camel-test-infra-iggy/src/main/java/org/apache/camel/test/infra/iggy/services
- camel-test-infra-ignite/src/main/java/org/apache/camel/test/infra/ignite/services
- camel-test-infra-keycloak/src/main/java/org/apache/camel/test/infra/keycloak/services
- camel-test-infra-mcp-everything/src/main/java/org/apache/camel/test/infra/mcp/everything/services
- camel-test-infra-microprofile-lra/src/main/java/org/apache/camel/test/infra/microprofile/lra/services
- camel-test-infra-minio/src/main/java/org/apache/camel/test/infra/minio/services
- camel-test-infra-mosquitto/src/main/java/org/apache/camel/test/infra/mosquitto/services
- camel-test-infra-nats/src/main/java/org/apache/camel/test/infra/nats/services
- camel-test-infra-openldap/src/main/java/org/apache/camel/test/infra/openldap/services
- camel-test-infra-postgres/src/main/java/org/apache/camel/test/infra/postgres/services
- camel-test-infra-rabbitmq/src/main/java/org/apache/camel/test/infra/rabbitmq/services
- camel-test-infra-redis/src/main/java/org/apache/camel/test/infra/redis/services
- camel-test-infra-solr/src/main/java/org/apache/camel/test/infra/solr/services
- camel-test-infra-tensorflow-serving/src/main/java/org/apache/camel/test/infra/tensorflow/serving/services
- camel-test-infra-triton/src/main/java/org/apache/camel/test/infra/triton/services
- camel-test-infra-xmpp/src/main/java/org/apache/camel/test/infra/xmpp/services
- camel-test-infra-zookeeper/src/main/java/org/apache/camel/test/infra/zookeeper/services
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
Lines changed: 50 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
24 | 59 | | |
25 | 60 | | |
26 | 61 | | |
| |||
36 | 71 | | |
37 | 72 | | |
38 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
39 | 89 | | |
40 | 90 | | |
41 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
25 | 59 | | |
26 | 60 | | |
27 | 61 | | |
| |||
36 | 70 | | |
37 | 71 | | |
38 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
39 | 86 | | |
40 | 87 | | |
41 | 88 | | |
Lines changed: 50 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
24 | 59 | | |
25 | 60 | | |
26 | 61 | | |
| |||
36 | 71 | | |
37 | 72 | | |
38 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
39 | 89 | | |
40 | 90 | | |
41 | 91 | | |
| |||
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
22 | 50 | | |
23 | 51 | | |
24 | 52 | | |
| |||
43 | 71 | | |
44 | 72 | | |
45 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
46 | 89 | | |
47 | 90 | | |
48 | 91 | | |
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
23 | 36 | | |
24 | 37 | | |
25 | 38 | | |
| |||
35 | 48 | | |
36 | 49 | | |
37 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
38 | 66 | | |
39 | 67 | | |
40 | 68 | | |
| |||
0 commit comments