Github user mike-tutkowski commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/767#discussion_r38414670 --- Diff: plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java --- @@ -1273,10 +1274,20 @@ public void testMigrateCommand() { verify(libvirtComputingResource, times(1)).getDisks(conn, vmName); try { verify(conn, times(1)).domainLookupByName(vmName); - verify(dm, times(1)).getXMLDesc(8); } catch (final LibvirtException e) { fail(e.getMessage()); } + + try { + verify(dm, times(1)).getXMLDesc(8); + } catch (final Throwable t) { --- End diff -- It's a Throwable because if the verify fails, it seems an Error is thrown instead of an Exception type. My first pass tried to catch LibvirtException, but that didn't work. Then I tried to catch Exception, but that didn't work either. On Tuesday, September 1, 2015, Daan Hoogland <notificati...@github.com> wrote: > In > plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java > <https://github.com/apache/cloudstack/pull/767#discussion_r38395369>: > > > } catch (final LibvirtException e) { > > fail(e.getMessage()); > > } > > + > > + try { > > + verify(dm, times(1)).getXMLDesc(8); > > + } catch (final Throwable t) { > > why such e general catch? this would probably not be the place to get out > of memory or other system failures. I'd say catch only LibvirtException > here. > > â > Reply to this email directly or view it on GitHub > <https://github.com/apache/cloudstack/pull/767/files#r38395369>. > -- *Mike Tutkowski* *Senior CloudStack Developer, SolidFire Inc.* e: mike.tutkow...@solidfire.com o: 303.746.7302 Advancing the way the world uses the cloud <http://solidfire.com/solution/overview/?video=play>*â¢*
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---