cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mike-tutkowski <...@git.apache.org>
Subject [GitHub] cloudstack pull request: Support live migration on older version o...
Date Tue, 01 Sep 2015 12:54:04 GMT
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 <notifications@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.tutkowski@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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message