public abstract class AbstractSynchronizedOsgiTests extends AbstractConfigurableOsgiTests
| Modifier and Type | Field and Description |
|---|---|
protected static long |
DEFAULT_WAIT_TIME |
OSGI_FRAMEWORK_SELECTORresourceLoaderbundleContextAUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE, AUTOWIRE_NOapplicationContextlogger| Constructor and Description |
|---|
AbstractSynchronizedOsgiTests()
Default constructor.
|
AbstractSynchronizedOsgiTests(String name)
Constructs a new
AbstractSynchronizedOsgiTests instance. |
| Modifier and Type | Method and Description |
|---|---|
protected long |
getDefaultWaitTime()
Returns the test default waiting time (in seconds).
|
protected boolean |
isSpringDMManaged(org.osgi.framework.Bundle bundle)
Determines if the given bundle, is Spring DM managed or not.
|
protected void |
postProcessBundleContext(org.osgi.framework.BundleContext platformBundleContext)
Post-processes the bundle context.
|
protected boolean |
shouldWaitForSpringBundlesContextCreation()
Indicates whether the test class should wait or not for the context
creation of Spring/OSGi bundles before executing the tests.
|
protected void |
waitOnContextCreation(org.osgi.framework.BundleContext context,
String forBundleWithSymbolicName,
long timeout)
Waits for a Spring powered bundle, given by its symbolic name,
to be fully started.
|
protected void |
waitOnContextCreation(String forBundleWithSymbolicName)
Waits for a Spring powered bundle, given by its symbolic name,
to be fully started.
|
protected void |
waitOnContextCreation(String forBundleWithSymbolicName,
long timeout)
Waits for a Spring powered bundle, given by its symbolic name
to be fully started.
|
createPlatform, getBootDelegationPackages, getPlatformNamegetTestBundles, getTestFrameworkBundles, preProcessBundleContext, run, runBarecreateApplicationContext, isContextKeyEmptygetAutowireMode, injectDependencies, isDependencyCheck, isPopulateProtectedVariables, prepareTestInstance, setAutowireMode, setDependencyCheck, setPopulateProtectedVariablescontextKey, createBeanDefinitionReader, customizeBeanFactory, getApplicationContext, getConfigLocations, getConfigPath, getConfigPaths, getLoadCount, loadContext, loadContextLocations, onSetUp, onTearDown, prepareApplicationContext, setDirty, setUp, tearDownaddContext, contextKeyString, getContext, hasCachedContext, setDirtygetDisabledTestCount, isDisabledInThisEnvironment, recordDisabledassertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, runTest, setName, toStringprotected static final long DEFAULT_WAIT_TIME
public AbstractSynchronizedOsgiTests()
AbstractSynchronizedOsgiTests instance.public AbstractSynchronizedOsgiTests(String name)
AbstractSynchronizedOsgiTests instance.name - test nameprotected void waitOnContextCreation(String forBundleWithSymbolicName, long timeout)
forBundleWithSymbolicName - bundle symbolic nametimeout - maximum time to wait (in seconds) for the application
context to be publishedprotected void waitOnContextCreation(org.osgi.framework.BundleContext context,
String forBundleWithSymbolicName,
long timeout)
context - bundle context to use for service lookupforBundleWithSymbolicName - bundle symbolic nametimeout - maximum time to wait (in seconds) for the application
context to be publishedprotected void waitOnContextCreation(String forBundleWithSymbolicName)
getDefaultWaitTime()).
This method is used by the testing framework at startup before
executing the actual tests.forBundleWithSymbolicName - bundle symbolic namegetDefaultWaitTime(),
waitOnContextCreation(BundleContext, String, long)protected long getDefaultWaitTime()
DEFAULT_WAIT_TIME is not enough. For
more customization, consider setting
shouldWaitForSpringBundlesContextCreation() to false and using
waitOnContextCreation(BundleContext, String, long).protected boolean shouldWaitForSpringBundlesContextCreation()
protected void postProcessBundleContext(org.osgi.framework.BundleContext platformBundleContext)
throws Exception
AbstractOsgiTestsBundleContext belongs to the underlying OSGi framework.
Normally, this method is called only one during the lifecycle of a test suite.postProcessBundleContext in class AbstractOsgiTestsplatformBundleContext - the platform bundle contextExceptionAbstractOsgiTests.preProcessBundleContext(BundleContext)protected boolean isSpringDMManaged(org.osgi.framework.Bundle bundle)
bundle - bundle to checkCopyright © 2006–2023. All rights reserved.