import static org.opendaylight.odlparent.featuretest.Constants.ORG_OPENDAYLIGHT_FEATURETEST_FEATUREVERSION_PROP;
import static org.opendaylight.odlparent.featuretest.Constants.ORG_OPENDAYLIGHT_FEATURETEST_URI_PROP;
import static org.ops4j.pax.exam.CoreOptions.maven;
+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.propagateSystemProperty;
import static org.ops4j.pax.exam.CoreOptions.systemPackages;
import static org.ops4j.pax.exam.CoreOptions.when;
return new Option[] {
// TODO: Find a way to inherit memory limits from Maven options.
new VMOption("-Xmx2g"),
+ new VMOption("-XX:+HeapDumpOnOutOfMemoryError"),
+ new VMOption("-XX:OnOutOfMemoryError=\"kill -3 %p\""),
// inspired by org.apache.commons.lang.SystemUtils
when(System.getProperty("os.name").toLowerCase().startsWith("linux")).useOptions(
// This prevents low entropy issues on Linux to affect Java random numbers
logLevel(LogLevel.WARN),
mvnLocalRepoOption(),
features(bundleTestRepo, "odl-bundles-test"),
+ mavenBundle("org.apache.aries.quiesce", "org.apache.aries.quiesce.api", "1.0.0"),
editConfigurationFilePut(ORG_OPS4J_PAX_LOGGING_CFG, LOG4J_LOGGER_ORG_OPENDAYLIGHT_YANGTOOLS_FEATURETEST,
LogLevel.INFO.name()),
+ editConfigurationFilePut("etc/config.properties", "karaf.framework", "equinox"),
editConfigurationFilePut(ETC_ORG_OPS4J_PAX_LOGGING_CFG, "log4j.rootLogger", "INFO, stdout, osgi:*"),
/*
*
return File.createTempFile("SingleFeatureTest-Karaf-JavaFlightRecorder", ".jfr").getAbsolutePath();
}
- private String getKarafVersion() {
+ private String getKarafVersion() throws IOException {
if (karafVersion == null) {
// We use a properties file to retrieve ${karaf.version}, instead of .versionAsInProject()
// This avoids forcing all users to depend on Karaf in their POMs
Properties singleFeatureTestProps = new Properties();
try (InputStream singleFeatureTestInputStream = Thread.currentThread().getContextClassLoader()
.getResourceAsStream(PROPERTIES_FILENAME)) {
+ if (singleFeatureTestInputStream == null) {
+ throw new IOException("Resource not found; expected to be present on current thread classloader: "
+ + PROPERTIES_FILENAME);
+ }
singleFeatureTestProps.load(singleFeatureTestInputStream);
- } catch (IOException e) {
- LOG.error("Unable to load {} to determine the Karaf version", PROPERTIES_FILENAME, e);
}
karafVersion = singleFeatureTestProps.getProperty(KARAF_DISTRO_VERSION_PROP);
return karafVersion;
}
- private String getKarafDistroVersion() {
+ private String getKarafDistroVersion() throws IOException {
if (karafDistroVersion == null) {
karafDistroVersion = System.getProperty(KARAF_DISTRO_VERSION_PROP);
if (karafDistroVersion == null) {
mvnRepoLocal);
}
- protected Option getKarafDistroOption() {
+ protected Option getKarafDistroOption() throws IOException {
String groupId = System.getProperty(KARAF_DISTRO_GROUPID_PROP, KARAF_DISTRO_GROUPID);
String artifactId = System.getProperty(KARAF_DISTRO_ARTIFACTID_PROP, KARAF_DISTRO_ARTIFACTID);
String type = System.getProperty(KARAF_DISTRO_TYPE_PROP, KARAF_DISTRO_TYPE);
"odl-mdsal-clustering-commons",
"odl-mdsal-distributed-datastore",
"odl-mdsal-remoterpc-connector",
- // aaa/features/authn due to Cassandra expected to be up on
- // see https://bugs.opendaylight.org/show_bug.cgi?id=7584
- "odl-aaa-authn-cassandra-cluster",
+ // Karaf 4 specific problems with genius features
+ // see https://bugs.opendaylight.org/show_bug.cgi?id=8100
+ "odl-genius",
+ "odl-genius-api",
+ "odl-genius-rest",
+ "odl-genius-ui",
+ "odl-genius-fcaps-framework",
+ "odl-genius-fcaps-application",
// 1/17 in groupbasedpolicy/features due to NOK org.opendaylight.groupbasedpolicy
// Caused by: org.opendaylight.mdsal.eos.common.api.CandidateAlreadyRegisteredException
// see https://bugs.opendaylight.org/show_bug.cgi?id=7587