IT failure on exc handling: ConnectException vs. UnknownHostException for badhostname
scottkurz opened this issue · 1 comments
I get this failure:
[ERROR] testSuite(it.io.openliberty.guides.inventory.InventoryEndpointTest) Time elapsed: 24.174 s <<< FAILURE!
java.lang.AssertionError: badhostname is not a valid host but it didn't raise an error
at it.io.openliberty.guides.inventory.InventoryEndpointTest.testUnknownHost(InventoryEndpointTest.java:147)
at it.io.openliberty.guides.inventory.InventoryEndpointTest.testSuite(InventoryEndpointTest.java:63)
Looking at the source and the logs, it seems the logic here requires: io.openliberty.guides.inventory.InventoryManager.handleProcessingException(ProcessingException)
to catch the ProcessingException and find a UnknownHostException as root cause so that the caller can cleanly return 'null' to its caller.
This actually worked for me in the office, at home though I'm getting a ConnectException instead , with both IBM and Oracle Java 8 JREs.
I think the logic could simply be expanded to look for this exc too.
- PR was merged and the ol.io site was updated with hotspot updates