Skip to content

Commit

Permalink
simplified tests for checking for failure
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Wells <[email protected]>
  • Loading branch information
matthewryanwells committed Jul 26, 2023
1 parent 3a11f9d commit a71a881
Showing 1 changed file with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1358,18 +1358,14 @@ public void testBracketedEquivalent() throws IOException {
compareBrackets("time", "time", "17:30:00");
compareBrackets("time", "t", "17:30:00");
}

private void queryFails(String query) {
assertThrows(ResponseException.class, ()->executeQuery(query));
}


@Test
public void testBracketFails() {
queryFails("select {time 'failure'}");
queryFails("select {t 'failure'}");
queryFails("select {date 'failure'}");
queryFails("select {d 'failure'}");
queryFails("select {timestamp 'failure'}");
queryFails("select {ts 'failure'}");
assertThrows(ResponseException.class, ()->executeQuery("select {time 'failure'}"));
assertThrows(ResponseException.class, ()->executeQuery("select {t 'failure'}"));
assertThrows(ResponseException.class, ()->executeQuery("select {date 'failure'}"));
assertThrows(ResponseException.class, ()->executeQuery("select {d 'failure'}"));
assertThrows(ResponseException.class, ()->executeQuery("select {timestamp 'failure'}"));
assertThrows(ResponseException.class, ()->executeQuery("select {ts 'failure'}"));
}
}

0 comments on commit a71a881

Please sign in to comment.