kgyrtkirk commented on code in PR #16046:
URL: https://github.com/apache/druid/pull/16046#discussion_r1516773585


##########
sql/src/test/java/org/apache/druid/sql/calcite/CalciteParameterQueryTest.java:
##########
@@ -589,32 +593,40 @@ public void testLongs()
   @Test
   public void testMissingParameter()
   {
-    expectedException.expect(
-        DruidExceptionMatcher.invalidSqlInput().expectMessageIs("No value 
bound for parameter (position [1])")
+    DruidException exception = assertThrows(
+        DruidException.class,
+        () -> testQuery(
+            "SELECT COUNT(*)\n"
+                + "FROM druid.numfoo\n"
+                + "WHERE l1 > ?",
+            ImmutableList.of(),
+            ImmutableList.of(new Object[] {3L}),
+            ImmutableList.of()
+        )
     );
-    testQuery(
-        "SELECT COUNT(*)\n"
-        + "FROM druid.numfoo\n"
-        + "WHERE l1 > ?",
-        ImmutableList.of(),
-        ImmutableList.of(new Object[]{3L}),
-        ImmutableList.of()
+    assertThat(
+        exception,
+        DruidExceptionMatcher.invalidSqlInput().expectMessageIs("No value 
bound for parameter (position [1])")
     );
   }
 
   @Test
   public void testPartiallyMissingParameter()
   {
-    expectedException.expect(
-        DruidExceptionMatcher.invalidSqlInput().expectMessageIs("No value 
bound for parameter (position [2])")
+    DruidException exception = assertThrows(
+        DruidException.class,
+        () -> testQuery(
+            "SELECT COUNT(*)\n"
+                + "FROM druid.numfoo\n"
+                + "WHERE l1 > ? AND f1 = ?",
+            ImmutableList.of(),
+            ImmutableList.of(new Object[] {3L}),
+            ImmutableList.of(new SqlParameter(SqlType.BIGINT, 3L))
+        )
     );
-    testQuery(
-        "SELECT COUNT(*)\n"
-        + "FROM druid.numfoo\n"
-        + "WHERE l1 > ? AND f1 = ?",
-        ImmutableList.of(),
-        ImmutableList.of(new Object[]{3L}),
-        ImmutableList.of(new SqlParameter(SqlType.BIGINT, 3L))
+    assertThat(

Review Comment:
   the ide have imported the wrong class...fixed it!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to