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

    https://github.com/apache/storm/pull/2248#discussion_r131534160
  
    --- Diff: 
external/storm-jdbc/src/test/java/org/apache/storm/jdbc/common/JdbcClientTest.java
 ---
    @@ -80,6 +85,24 @@ public void testInsertAndSelect() {
             Assert.assertEquals(rows, selectedRows);
         }
     
    +    @Rule
    +    public ExpectedException thrown = ExpectedException.none();
    +
    +    @Test
    +    public void testInsertConnectionError() {
    +
    +        ConnectionProvider connectionProvider = new 
MockConnectionProvider(null);
    +        this.client = new JdbcClient(connectionProvider, 60);
    +
    +        List<Column> row = createRow(1, "frank");
    +        List<List<Column>> rows  = new ArrayList<List<Column>>();
    +        rows.add(row);
    +        String query  = "insert into user_details values(?,?,?)";
    +
    +        thrown.expect(MultipleFailureException.class);
    --- End diff --
    
    It's thrown from closeConnection via throw new 
IllegalStateException(finalException). If an exception is embedded into another 
exception, it will be thrown as MultipleFailureException. 


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