use of org.ops4j.pax.exam.Configuration in project hibernate-orm by hibernate.
the class OsgiIntegrationTest method config.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Prepare the Karaf container
@Configuration
public Option[] config() throws Exception {
final Properties paxExamEnvironment = loadPaxExamEnvironmentProperties();
final boolean debug = ConfigurationHelper.getBoolean("org.hibernate.testing.osgi.paxExam.debug", Environment.getProperties(), DEBUG);
return options(when(debug).useOptions(debugConfiguration("5005", true)), karafDistributionConfiguration().frameworkUrl(paxExamEnvironment.getProperty("org.ops4j.pax.exam.container.karaf.distroUrl")).karafVersion(paxExamEnvironment.getProperty("org.ops4j.pax.exam.container.karaf.version")).name("Apache Karaf").unpackDirectory(new File(paxExamEnvironment.getProperty("org.ops4j.pax.exam.container.karaf.unpackDir"))).useDeployFolder(false), editConfigurationFileExtend("etc/org.ops4j.pax.url.mvn.cfg", "org.ops4j.pax.url.mvn.repositories", "https://repository.jboss.org/nexus/content/groups/public/"), configureConsole().ignoreLocalConsole().ignoreRemoteShell(), when(debug).useOptions(keepRuntimeFolder()), logLevel(LogLevelOption.LogLevel.INFO), features(featureXmlUrl(paxExamEnvironment), "hibernate-orm"), features(featureXmlUrl(paxExamEnvironment), "hibernate-envers"), features(testingFeatureXmlUrl(), "hibernate-osgi-testing"));
}
use of org.ops4j.pax.exam.Configuration in project karaf by apache.
the class ImportServiceTest method config.
@SuppressWarnings("deprecation")
@Configuration
public Option[] config() {
List<Option> options = new ArrayList<>(Arrays.asList(super.config()));
InputStream testBundleImportService = bundle().set(Constants.IMPORT_SERVICE, "FooService").set(Constants.BUNDLE_SYMBOLICNAME, BUNDLE1_NAME).set(Constants.BUNDLE_VERSION, "1.0.0").set(Constants.BUNDLE_MANIFESTVERSION, "2").build();
options.add(CoreOptions.streamBundle(testBundleImportService));
InputStream testBundleRequireService = bundle().set(Constants.REQUIRE_CAPABILITY, "osgi.service;effective:=active;filter:=\"(objectClass=FooService)\"").set(Constants.BUNDLE_SYMBOLICNAME, BUNDLE2_NAME).set(Constants.BUNDLE_VERSION, "1.0.0").set(Constants.BUNDLE_MANIFESTVERSION, "2").build();
options.add(CoreOptions.streamBundle(testBundleRequireService));
return options.toArray(new Option[] {});
}
use of org.ops4j.pax.exam.Configuration in project aries by apache.
the class AbstractTransactionTest method localServerH2XATxConfiguration.
@Configuration
public Option[] localServerH2XATxConfiguration() {
String localRepo = System.getProperty("maven.repo.local");
if (localRepo == null) {
localRepo = System.getProperty("org.ops4j.pax.url.mvn.localRepository");
}
Option testSpecificOptions = testSpecificOptions();
return options(junitBundles(), systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"), when(localRepo != null).useOptions(CoreOptions.vmOption("-Dorg.ops4j.pax.url.mvn.localRepository=" + localRepo)), xaTxControlService(), localJdbcResourceProviderWithH2(), systemProperty(REMOTE_DB_PROPERTY).value(getRemoteDBPath()), when(testSpecificOptions != null).useOptions(testSpecificOptions), mavenBundle("org.ops4j.pax.logging", "pax-logging-api").versionAsInProject(), mavenBundle("org.ops4j.pax.logging", "pax-logging-service").versionAsInProject());
}
use of org.ops4j.pax.exam.Configuration in project aries by apache.
the class AbstractTransactionTest method localEmbeddedH2XATxConfiguration.
@Configuration
public Option[] localEmbeddedH2XATxConfiguration() {
String localRepo = System.getProperty("maven.repo.local");
if (localRepo == null) {
localRepo = System.getProperty("org.ops4j.pax.url.mvn.localRepository");
}
Option testSpecificOptions = testSpecificOptions();
return options(junitBundles(), systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"), when(localRepo != null).useOptions(CoreOptions.vmOption("-Dorg.ops4j.pax.url.mvn.localRepository=" + localRepo)), xaTxControlService(), localJdbcResourceProviderWithH2(), when(testSpecificOptions != null).useOptions(testSpecificOptions), mavenBundle("org.ops4j.pax.logging", "pax-logging-api").versionAsInProject(), mavenBundle("org.ops4j.pax.logging", "pax-logging-service").versionAsInProject());
}
use of org.ops4j.pax.exam.Configuration in project aries by apache.
the class AbstractTransactionTest method xaConfigAdminDrivenH2XATxConfiguration.
@Configuration
public Option[] xaConfigAdminDrivenH2XATxConfiguration() {
String localRepo = System.getProperty("maven.repo.local");
if (localRepo == null) {
localRepo = System.getProperty("org.ops4j.pax.url.mvn.localRepository");
}
Option testSpecificOptions = testSpecificOptions();
return options(junitBundles(), systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"), when(localRepo != null).useOptions(CoreOptions.vmOption("-Dorg.ops4j.pax.url.mvn.localRepository=" + localRepo)), xaTxControlService(), xaJdbcResourceProviderWithH2(), systemProperty(REMOTE_DB_PROPERTY).value(getRemoteDBPath()), mavenBundle("org.apache.felix", "org.apache.felix.configadmin").versionAsInProject(), systemProperty(CONFIGURED_PROVIDER_PROPERTY).value("xa"), when(testSpecificOptions != null).useOptions(testSpecificOptions), mavenBundle("org.ops4j.pax.logging", "pax-logging-api").versionAsInProject(), mavenBundle("org.ops4j.pax.logging", "pax-logging-service").versionAsInProject());
}
Aggregations