public class CamelKarafTestSupport
extends org.apache.camel.test.junit4.CamelTestSupport
Modifier and Type | Field and Description |
---|---|
protected org.osgi.framework.BundleContext |
bundleContext |
protected ExecutorService |
executor |
protected org.apache.karaf.features.FeaturesService |
featuresService |
Constructor and Description |
---|
CamelKarafTestSupport() |
Modifier and Type | Method and Description |
---|---|
void |
assertFeatureInstalled(String featureName) |
void |
assertFeatureInstalled(String featureName,
String featureVersion) |
static org.ops4j.pax.exam.Option[] |
configure(String... extra) |
protected String |
executeCommand(String command,
Long timeout,
Boolean silent,
Principal... principals)
Executes a shell command and returns output as a String.
|
protected String |
executeCommand(String command,
Principal... principals)
Executes a shell command and returns output as a String.
|
File |
getConfigFile(String path) |
JMXConnector |
getJMXConnector() |
JMXConnector |
getJMXConnector(String userName,
String passWord) |
protected <T> T |
getOsgiService(Class<T> type) |
protected <T> T |
getOsgiService(Class<T> type,
long timeout) |
protected <T> T |
getOsgiService(Class<T> type,
String filter,
long timeout) |
protected void |
installAndAssertFeature(String feature) |
protected void |
installAndAssertFeature(String feature,
String version) |
protected void |
installAssertAndUninstallFeature(String feature) |
protected void |
installAssertAndUninstallFeature(String feature,
String version) |
protected void |
installAssertAndUninstallFeatures(String... feature) |
org.ops4j.pax.exam.TestProbeBuilder |
probeConfiguration(org.ops4j.pax.exam.TestProbeBuilder probe) |
protected void |
uninstallNewFeatures(Set<org.apache.karaf.features.Feature> featuresBefore)
The feature service does not uninstall feature dependencies when uninstalling a single feature.
|
applyCamelPostProcessor, assertExpression, assertMockEndpointsSatisfied, assertMockEndpointsSatisfied, assertPredicate, assertResolveLanguage, assertValidContext, camelContextService, cleanupResources, consumer, context, createCamelContext, createExchangeWithBody, createJndiContext, createRegistry, createRouteBuilder, createRouteBuilders, debugAfter, debugBefore, disableJMX, doPostSetup, doPostTearDown, doPreSetup, doSpringBootCheck, enableJMX, fluentTemplate, getCamelContextService, getCamelTestWatcher, getMandatoryEndpoint, getMandatoryEndpoint, getMockEndpoint, getMockEndpoint, getShutdownTimeout, hasClassAnnotation, ignoreMissingLocationWithPropertiesComponent, isCreateCamelContextPerClass, isDumpRouteCoverage, isLazyLoadingTypeConverter, isMockEndpoints, isMockEndpointsAndSkip, isUseAdviceWith, isUseDebugger, isUseRouteBuilder, postProcessTest, replaceRouteFromWith, resetMocks, resolveMandatoryEndpoint, resolveMandatoryEndpoint, sendBodies, sendBody, sendBody, setCamelContextService, setUp, setupResources, setUseRouteBuilder, startCamelContext, stopCamelContext, tearDown, template, useJmx, useOverridePropertiesWithPropertiesComponent
assertCollectionSize, assertCollectionSize, assertDirectoryEquals, assertDirectoryEquals, assertEndpointUri, assertExpression, assertFileExists, assertFileNotExists, assertInMessageBodyEquals, assertInMessageHeader, assertIsInstanceOf, assertListSize, assertListSize, assertMessageHeader, assertOneElement, assertOutMessageBodyEquals, assertOutMessageHeader, assertPredicate, assertPredicateDoesNotMatch, assertPredicateMatches, assertStringContains, body, bodyAs, createDirectory, createExchangeWithBody, deleteDirectory, deleteDirectory, exchangeProperty, faultBody, faultBodyAs, getJavaMajorVersion, getRouteList, getTestMethodName, getTestName, header, isJava15, isJava16, isJava17, isJava18, isJava18Build261OrLater, isJava19, isJavaVendor, isPlatform, outBody, outBodyAs, property, resolveMandatoryEndpoint, resolveMandatoryEndpoint, systemProperty, systemProperty, unwrap, unwrapChannel
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail
protected ExecutorService executor
@Inject protected org.osgi.framework.BundleContext bundleContext
@Inject protected org.apache.karaf.features.FeaturesService featuresService
public org.ops4j.pax.exam.TestProbeBuilder probeConfiguration(org.ops4j.pax.exam.TestProbeBuilder probe)
public static org.ops4j.pax.exam.Option[] configure(String... extra)
protected String executeCommand(String command, Principal... principals)
command
- The command to executeprincipals
- The principals (e.g. RolePrincipal objects) to run the command underprotected String executeCommand(String command, Long timeout, Boolean silent, Principal... principals)
command
- The command to execute.timeout
- The amount of time in millis to wait for the command to execute.silent
- Specifies if the command should be displayed in the screen.principals
- The principals (e.g. RolePrincipal objects) to run the command underprotected <T> T getOsgiService(Class<T> type, long timeout)
protected <T> T getOsgiService(Class<T> type)
public JMXConnector getJMXConnector() throws Exception
Exception
public JMXConnector getJMXConnector(String userName, String passWord) throws Exception
Exception
public void assertFeatureInstalled(String featureName)
public void assertFeatureInstalled(String featureName, String featureVersion)
protected void installAndAssertFeature(String feature) throws Exception
Exception
protected void installAndAssertFeature(String feature, String version) throws Exception
Exception
protected void installAssertAndUninstallFeature(String feature) throws Exception
Exception
protected void installAssertAndUninstallFeature(String feature, String version) throws Exception
Exception
protected void installAssertAndUninstallFeatures(String... feature) throws Exception
Exception
protected void uninstallNewFeatures(Set<org.apache.karaf.features.Feature> featuresBefore)
Apache Camel