Bug 8175: Improve SFT TestBundleDiag under Karaf 4 09/53109/17
authorMichael Vorburger <vorburger@redhat.com>
Fri, 10 Mar 2017 00:46:39 +0000 (01:46 +0100)
committerMichael Vorburger <vorburger@redhat.com>
Thu, 6 Apr 2017 23:34:42 +0000 (01:34 +0200)
commite37b54d911c43b9a7a0f24fa2c28b07ca1e54911
treeceac24e7d66b982204bc16dcdf957d7a1e6ebc4a
parent0cdccf2a79a6e3a33b58768bc7dfcdf45feab5cc
Bug 8175: Improve SFT TestBundleDiag under Karaf 4

This does NOT yet completely fix all problems of the SingleFeatureTest
TestBundleDiag under Karaf 4 (which was in really bad shape!), most
importantly there is still something somewhere in Pax Exam that I
haven't understood yet which seems to just "swallow" all exceptions
thrown by SingleFeatureTest's @Test installFeature() but at least now:

1. there is something in the log now for failures at least
   thanks to a (try/catch/log) WORKAROUND (!)

2. LinkageError fixed (see details below)

3. IllegalStateException: BundleContext is no longer valid fixed (?)

This changes the setup by just embedding bundles4-test and it's
dependencies into features4-test, instead of programmatically installing
the odl-bundles-test feature (which is removed in this change) or the
features4-test bundle.

This simplifies installation, avoid problems with the wrap: protocol,
and should resolve weird problems we've seen (only!) in the distribution
jobs, which seem to have had something to do with a custom local Maven
repo.

IMHO it would be *REALLY* good to practice proper TDD for SFT (with
TestBundleDiag) now, and have some automated negative testing of broken
features and bundles (incl. BP) in odlparent...

Bug: 7981 related later proper solution
Change-Id: I516c0f6c4e9ee85f0c753cb4b58a0b53fc22c7ea
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
bundles4-test/pom.xml
bundles4-test/src/main/java/org/opendaylight/odlparent/bundles4test/BundleDiagInfos.java
bundles4-test/src/main/java/org/opendaylight/odlparent/bundles4test/TestBundleDiag.java
features4-test/pom.xml
features4-test/src/main/java/org/opendaylight/odlparent/featuretest/PerFeatureRunNotifier.java
features4-test/src/main/java/org/opendaylight/odlparent/featuretest/PerFeatureRunner.java
features4-test/src/main/java/org/opendaylight/odlparent/featuretest/ReflectionUtil.java [new file with mode: 0644]
features4-test/src/main/java/org/opendaylight/odlparent/featuretest/SingleFeatureTest.java
features4-test/src/test/java/org/opendaylight/odlparent/featuretest/ReflectionUtilTest.java [new file with mode: 0644]
features4/odl-bundles-test/pom.xml [deleted file]
features4/pom.xml