add feature whitelist definition
Adding a whitelist for repositories. Useful if new repositories overlay actual used versions without warning.
This is a replacement for https://github.com/apache/karaf/pull/1020 with a bugfix.
If I test it locally it's working fine. The error looks like a timeout, could you retry the jenkins test?
'gave up waiting for service org.apache.karaf.features.BootFinished' 2020-03-23 07:34:13,123 | INFO | rn.RemoteBundleContextClientImpl 240 | Waiting for remote bundle context.. on 21000 name: 5e69551d-f24b-424f-ab83-db6319e2581d timout: [ RelativeTimeout value = 3600000 ]
Locally I executed mvn clean install in itests. And separate the failed test
mvn -Dtest=StandardFeaturesTest#installSchedulerFeature test [INFO] Scanning for projects... [INFO] [INFO] -------------------< org.apache.karaf.itests:tests >-------------------- [INFO] Building Apache Karaf :: Integration Tests :: Tests 4.3.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce-maven-version) @ tests --- [INFO] [INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce-maven) @ tests --- [INFO] [INFO] --- maven-bundle-plugin:4.2.1:cleanVersions (cleanVersions) @ tests --- [INFO] [INFO] --- maven-remote-resources-plugin:1.6.0:process (process-resource-bundles) @ tests --- [INFO] Preparing remote bundle org.apache:apache-jar-resource-bundle:1.4 [INFO] Copying 3 resources from 1 bundle. [INFO] [INFO] --- maven-remote-resources-plugin:1.6.0:process (default) @ tests --- [INFO] Preparing remote bundle org.apache:apache-jar-resource-bundle:1.4 [INFO] Copying 3 resources from 1 bundle. [INFO] [INFO] --- depends-maven-plugin:1.4.0:generate-depends-file (generate-depends-file) @ tests --- [INFO] Created: /Users/mikehummel/MHU/workspaces/karaf/karaf/itests/test/target/classes/META-INF/maven/dependencies.properties [INFO] [INFO] --- maven-resources-plugin:3.1.0:resources (filter) @ tests --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /Users/mikehummel/MHU/workspaces/karaf/karaf/itests/test/src/main/resources [INFO] Copying 3 resources [INFO] Copying 3 resources [INFO] [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ tests --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /Users/mikehummel/MHU/workspaces/karaf/karaf/itests/test/src/main/resources [INFO] Copying 3 resources [INFO] Copying 3 resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ tests --- [INFO] No sources to compile [INFO] [INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ tests --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 10 resources [INFO] Copying 3 resources [INFO] Copying 3 resources [INFO] Copying 3 resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ tests --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ tests --- [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running org.apache.karaf.itests.features.StandardFeaturesTest 2020-03-24 10:39:03,303 | INFO | j.pax.exam.spi.DefaultExamSystem 127 | Pax Exam System (Version: 4.13.2) created. 2020-03-24 10:39:03,349 | INFO | .pax.exam.junit.impl.ProbeRunner 74 | creating PaxExam runner for class org.apache.karaf.itests.features.StandardFeaturesTest 2020-03-24 10:39:03,408 | INFO | .pax.exam.junit.impl.ProbeRunner 94 | running test class org.apache.karaf.itests.features.StandardFeaturesTest 2020-03-24 10:39:03,410 | INFO | iner.internal.KarafTestContainer 142 | Creating RMI registry server on 127.0.0.1:21000 2020-03-24 10:39:04,559 | INFO | iner.internal.KarafTestContainer 205 | Found 0 options when requesting OverrideJUnitBundlesOption.class 2020-03-24 10:39:04,601 | INFO | iner.internal.KarafTestContainer 258 | Wait for test container to finish its initialization [ RelativeTimeout value = 3600000 ] 2020-03-24 10:39:04,603 | INFO | rn.RemoteBundleContextClientImpl 240 | Waiting for remote bundle context.. on 21000 name: 649eda30-4b38-4406-a795-86ad09e763e2 timout: [ RelativeTimeout value = 3600000 ] WARNING: package org.apache.karaf.specs.locator not in java.base
StandardFeaturesTest: installSchedulerFeature Installing [scheduler] Uninstalling [scheduler] 2020-03-24 10:39:11,694 | INFO | exam.spi.reactors.ReactorManager 444 | suite finished [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.543 s - in org.apache.karaf.itests.features.StandardFeaturesTest [INFO] [INFO] Results: [INFO] [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 13.450 s [INFO] Finished at: 2020-03-24T10:39:12+01:00 [INFO] ------------------------------------------------------------------------
I did a fix and add a unit test for repository black and white list
Currently the behaviour of fresh karaf installation is not stable because new repositories will automatically be added and used. A configuration is needed to deny all repositories expect the wanted. This is possible with repo blacklist and whitelist configuration. With blacklist you are able to deny all and with whitelist you can define exceptions for it.
retest this please
Added missing license header to test class
Hello, the change is fixed now. Maybe it's possible to merge it into the next release. Regards, Mike
@mhus thanks, I'm doing a new pass and target to next release cycle.
Hi! I'm not sure what's going on with the test. I'm not sure it depends on the provided change. I will try to compile it locally.