Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1511#discussion_r78647426
  
    --- Diff: server/test/org/apache/cloudstack/network/lb/CertServiceTest.java 
---
    @@ -686,35 +689,35 @@ public void runDeleteSslCertBoundCert() throws 
NoSuchFieldException, IllegalAcce
             when(certService._entityMgr.findById(eq(LoadBalancerVO.class), 
anyLong())).thenReturn(new LoadBalancerVO());
     
             //creating the command
    -        DeleteSslCertCmd deleteCmd = new DeleteSslCertCmdExtn();
    -        Class<?> _class = deleteCmd.getClass().getSuperclass();
    +        final DeleteSslCertCmd deleteCmd = new DeleteSslCertCmdExtn();
    +        final Class<?> klazz = deleteCmd.getClass().getSuperclass();
     
    -        Field certField = _class.getDeclaredField("id");
    +        final Field certField = klazz.getDeclaredField("id");
             certField.setAccessible(true);
             certField.set(deleteCmd, certId);
     
             try {
                 certService.deleteSslCert(deleteCmd);
                 fail("Delete with a cert id bound to a lb should fail");
    -        } catch (Exception e) {
    +        } catch (final Exception e) {
                 assertTrue(e.getMessage().contains("Certificate in use by a 
loadbalancer"));
             }
    --- End diff --
    
    Please consider replacing this `try` block with `expected` on the `@Test` 
annotation


---
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.
---

Reply via email to