Skip to content

Commit

Permalink
fixed redundant tests and improved tests that should fail
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Wells <matthew.wells@improving.com>
  • Loading branch information
matthewryanwells committed Jul 24, 2023
1 parent 3ba8b5e commit b05d1b4
Showing 1 changed file with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1319,13 +1319,13 @@ public void testTimeBracket() throws IOException {
verifySchema(result, schema("{t '17:30:00'}", null, "time"));
verifyDataRows(result, rows("17:30:00"));

result = executeQuery("select {time '17:30:00'}");
verifySchema(result, schema("{time '17:30:00'}", null, "time"));
verifyDataRows(result, rows("17:30:00"));
result = executeQuery("select {time '17:30:00.123'}");
verifySchema(result, schema("{time '17:30:00.123'}", null, "time"));
verifyDataRows(result, rows("17:30:00.123"));

result = executeQuery("select {t '17:30:00'}");
verifySchema(result, schema("{t '17:30:00'}", null, "time"));
verifyDataRows(result, rows("17:30:00"));
result = executeQuery("select {t '17:30:00.123'}");
verifySchema(result, schema("{t '17:30:00.123'}", null, "time"));
verifyDataRows(result, rows("17:30:00.123"));
}

@Test
Expand Down Expand Up @@ -1361,11 +1361,13 @@ public void testBracketedEquivalent() throws IOException {

@Test
public void testBracketFails() {
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'}"));
assertThrows(ResponseException.class, ()->executeQuery("select {time '2020-09-16'}"));
assertThrows(ResponseException.class, ()->executeQuery("select {t '2020-09-16'}"));
assertThrows(ResponseException.class, ()->executeQuery("select {date '17:30:00'}"));
assertThrows(ResponseException.class, ()->executeQuery("select {d '17:30:00'}"));
assertThrows(ResponseException.class, ()->executeQuery("select {timestamp '2020-09-16'}"));
assertThrows(ResponseException.class, ()->executeQuery("select {ts '2020-09-16'}"));
assertThrows(ResponseException.class, ()->executeQuery("select {timestamp '17:30:00'}"));
assertThrows(ResponseException.class, ()->executeQuery("select {ts '17:30:00'}"));
}
}

0 comments on commit b05d1b4

Please sign in to comment.