Class ContainerAwareSpringTestSupport
- java.lang.Object
-
- org.apache.camel.test.junit5.CamelTestSupport
-
- org.apache.camel.test.spring.junit5.CamelSpringTestSupport
-
- org.apache.camel.test.testcontainers.spring.junit5.ContainerAwareSpringTestSupport
-
- All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterAllCallback
,org.junit.jupiter.api.extension.AfterTestExecutionCallback
,org.junit.jupiter.api.extension.BeforeAllCallback
,org.junit.jupiter.api.extension.BeforeEachCallback
,org.junit.jupiter.api.extension.BeforeTestExecutionCallback
,org.junit.jupiter.api.extension.Extension
public abstract class ContainerAwareSpringTestSupport extends org.apache.camel.test.spring.junit5.CamelSpringTestSupport
-
-
Constructor Summary
Constructors Constructor Description ContainerAwareSpringTestSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
cleanupResources()
protected org.testcontainers.containers.Network
containerNetwork()
protected long
containerShutdownTimeout()
protected long
containersStartupTimeout()
protected org.apache.camel.CamelContext
createCamelContext()
protected org.testcontainers.containers.GenericContainer<?>
createContainer()
protected List<org.testcontainers.containers.GenericContainer<?>>
createContainers()
protected org.testcontainers.containers.GenericContainer<?>
getContainer(String containerName)
protected String
getContainerHost(String containerName)
protected int
getContainerPort(String containerName, int originalPort)
protected void
setupResources()
-
Methods inherited from class org.apache.camel.test.spring.junit5.CamelSpringTestSupport
activeProfiles, createApplicationContext, doPostTearDown, doPreSetup, excludeRoute, excludeRoutes, getMandatoryBean, getRouteExcludingApplicationContext, postProcessTest, tearDown
-
Methods inherited from class org.apache.camel.test.junit5.CamelTestSupport
afterAll, afterTestExecution, applyCamelPostProcessor, assertExpression, assertMockEndpointsSatisfied, assertMockEndpointsSatisfied, assertPredicate, assertResolveLanguage, assertValidContext, beforeAll, beforeEach, beforeTestExecution, bindToRegistry, camelContextService, consumer, context, createCamelRegistry, createExchangeWithBody, createRouteBuilder, createRouteBuilders, debugAfter, debugBefore, disableJMX, doPostSetup, doSpringBootCheck, enableJMX, fluentTemplate, getCamelContextService, getCurrentTestName, getMandatoryEndpoint, getMandatoryEndpoint, getMockEndpoint, getMockEndpoint, getRouteFilterExcludePattern, getRouteFilterIncludePattern, getShutdownTimeout, hasClassAnnotation, ignoreMissingLocationWithPropertiesComponent, isCreateCamelContextPerClass, isDumpRouteCoverage, isMockEndpoints, isMockEndpointsAndSkip, isUseAdviceWith, isUseDebugger, isUseRouteBuilder, replaceRouteFromWith, resetMocks, resolveMandatoryEndpoint, resolveMandatoryEndpoint, sendBodies, sendBody, sendBody, setCamelContextService, setUp, setUseRouteBuilder, startCamelContext, stopCamelContext, template, timeTaken, useJmx, useOverridePropertiesWithPropertiesComponent
-
-
-
-
Method Detail
-
setupResources
protected void setupResources() throws Exception
- Overrides:
setupResources
in classorg.apache.camel.test.junit5.CamelTestSupport
- Throws:
Exception
-
cleanupResources
protected void cleanupResources() throws Exception
- Overrides:
cleanupResources
in classorg.apache.camel.test.junit5.CamelTestSupport
- Throws:
Exception
-
createCamelContext
protected org.apache.camel.CamelContext createCamelContext() throws Exception
- Overrides:
createCamelContext
in classorg.apache.camel.test.spring.junit5.CamelSpringTestSupport
- Throws:
Exception
-
createContainer
protected org.testcontainers.containers.GenericContainer<?> createContainer()
-
createContainers
protected List<org.testcontainers.containers.GenericContainer<?>> createContainers()
-
containersStartupTimeout
protected long containersStartupTimeout()
-
containerShutdownTimeout
protected long containerShutdownTimeout()
-
containerNetwork
protected org.testcontainers.containers.Network containerNetwork()
-
getContainer
protected org.testcontainers.containers.GenericContainer<?> getContainer(String containerName)
-
getContainerPort
protected int getContainerPort(String containerName, int originalPort)
-
-