[ODLPARENT-78] [Karaf 4] SFT never fails, Pax Exam (or our wrappers) swallow all exceptions Created: 14/Mar/17 Updated: 24/Jan/18 Resolved: 07/Apr/17 |
|
| Status: | Resolved |
| Project: | odlparent |
| Component/s: | General |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Michael Vorburger | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Issue Links: |
|
||||||||
| External issue ID: | 7981 | ||||||||
| Description |
|
SingleFeatureTest (SFT) under Karaf 4 never actually fails, even if there are exceptions .. Pax Exam, or (more likely perhaps) something |
| Comments |
| Comment by Michael Vorburger [ 14/Mar/17 ] |
|
For the short term, I'll add a try { } catch () { LOG.error(); rethrow }to SFT in https://git.opendaylight.org/gerrit/#/c/53109/ - that will at least let us see exceptions in the log... |
| Comment by Stephen Kitt [ 07/Apr/17 ] |
|
SFT does catch some errors, see for example https://git.opendaylight.org/gerrit/54077 |
| Comment by Michael Vorburger [ 07/Apr/17 ] |
|
> SFT does catch some errors Yeah, I was wondering were exactly we were at with this, so I've just re-tested this properly, now that c/53109 is merged (so with a local odlparent already including that change), by simply locally changing features4-test SingleFeatureTest's installFeature() method and removing all of its code, so it actually does not install any feature nor call TestBundleDiag anymore - real simple, and tried to just put these 3 failures into it, one after the other: public void installFeature() throws Exception { And then tried an e.g. "mvn clean install" this patched features4-test, and then run run "mvn clean package" e.g. in infrautils/common/features/infrautils-features4 - and found that all 3 types do get both logged as as well make mvn fail... So... I'm not sure anymore what exactly I had been smoking and observed 3 weeks ago - but it works now (perhaps related to other changes I made in the final version of c/53109 meanwhile?!). Or maybe there was something particularly strange happening during the featuresService.installFeature and TestBundleDiag, removed for this simplistic test, but I can't think of what - ultimately whatever blows up there would just be some sort of, hopefully, propagated, Exception as above... Let's close this; we can re-open if anyone does observe an SFT with exceptions in the log which does not fail the Maven build when it should... NB it will not be able to detect exceptions thrown in background threads in Karaf, or caught and logged but not propagated exceptions; that's a completely separate problem. Maybe that's actually a particular case that some failures run into; Karaf 4 may well have bugs where certain feature installation problems get logged but do not reach us through the FeaturesService and BundleService we use in SFT to determine if everything installed smoothly? PPS: My local tests confused the hell out of me due to completely unrelated |