Github user revans2 commented on a diff in the pull request:
https://github.com/apache/storm/pull/2248#discussion_r131263697
--- 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 --
I am not super familiar with MultipleFailureException. I though that
`thrown.expect(MultipleFailureException.class)` will verify that an instance of
MultipleFailureException is thrown by `client.executeInsertQuery...` but
because it is not a part of our code I must be wrong. Is it being treated like
a wild card then?
---
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 [email protected] or file a JIRA ticket
with INFRA.
---