You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "clintropolis (via GitHub)" <gi...@apache.org> on 2026/04/13 18:32:31 UTC

[PR] test: convert tests in druid-processing to junit5 pt. 3 (druid)

clintropolis opened a new pull request, #19302:
URL: https://github.com/apache/druid/pull/19302

   next batch 
   
   previous:
   * #19289
   * #19299


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] test: convert tests in druid-processing to junit5 pt. 3 (druid)

Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on code in PR #19302:
URL: https://github.com/apache/druid/pull/19302#discussion_r3075185741


##########
processing/src/test/java/org/apache/druid/common/guava/GuavaUtilsTest.java:
##########
@@ -50,23 +50,23 @@
   @Test
   public void testParseLong()
   {
-    Assert.assertNull(Longs.tryParse("+100"));
-    Assert.assertNull(GuavaUtils.tryParseLong(""));
-    Assert.assertNull(GuavaUtils.tryParseLong(null));
-    Assert.assertNull(GuavaUtils.tryParseLong("+"));
-    Assert.assertNull(GuavaUtils.tryParseLong("++100"));
-    Assert.assertEquals((Object) Long.parseLong("+100"), GuavaUtils.tryParseLong("+100"));
-    Assert.assertEquals((Object) Long.parseLong("-100"), GuavaUtils.tryParseLong("-100"));
-    Assert.assertNotEquals(Long.valueOf(100L), GuavaUtils.tryParseLong("+101"));
+    Assertions.assertNull(Longs.tryParse("+100"));
+    Assertions.assertNull(GuavaUtils.tryParseLong(""));
+    Assertions.assertNull(GuavaUtils.tryParseLong(null));
+    Assertions.assertNull(GuavaUtils.tryParseLong("+"));
+    Assertions.assertNull(GuavaUtils.tryParseLong("++100"));
+    Assertions.assertEquals((Object) Long.parseLong("+100"), GuavaUtils.tryParseLong("+100"));

Review Comment:
   ## CodeQL / Missing catch of NumberFormatException
   
   Potential uncaught 'java.lang.NumberFormatException'.
   
   [Show more details](https://github.com/apache/druid/security/code-scanning/10971)



##########
processing/src/test/java/org/apache/druid/common/guava/GuavaUtilsTest.java:
##########
@@ -50,23 +50,23 @@
   @Test
   public void testParseLong()
   {
-    Assert.assertNull(Longs.tryParse("+100"));
-    Assert.assertNull(GuavaUtils.tryParseLong(""));
-    Assert.assertNull(GuavaUtils.tryParseLong(null));
-    Assert.assertNull(GuavaUtils.tryParseLong("+"));
-    Assert.assertNull(GuavaUtils.tryParseLong("++100"));
-    Assert.assertEquals((Object) Long.parseLong("+100"), GuavaUtils.tryParseLong("+100"));
-    Assert.assertEquals((Object) Long.parseLong("-100"), GuavaUtils.tryParseLong("-100"));
-    Assert.assertNotEquals(Long.valueOf(100L), GuavaUtils.tryParseLong("+101"));
+    Assertions.assertNull(Longs.tryParse("+100"));
+    Assertions.assertNull(GuavaUtils.tryParseLong(""));
+    Assertions.assertNull(GuavaUtils.tryParseLong(null));
+    Assertions.assertNull(GuavaUtils.tryParseLong("+"));
+    Assertions.assertNull(GuavaUtils.tryParseLong("++100"));
+    Assertions.assertEquals((Object) Long.parseLong("+100"), GuavaUtils.tryParseLong("+100"));
+    Assertions.assertEquals((Object) Long.parseLong("-100"), GuavaUtils.tryParseLong("-100"));

Review Comment:
   ## CodeQL / Missing catch of NumberFormatException
   
   Potential uncaught 'java.lang.NumberFormatException'.
   
   [Show more details](https://github.com/apache/druid/security/code-scanning/10972)



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] test: convert tests in druid-processing to junit5 pt. 3 (druid)

Posted by "clintropolis (via GitHub)" <gi...@apache.org>.
clintropolis merged PR #19302:
URL: https://github.com/apache/druid/pull/19302


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] test: convert tests in druid-processing to junit5 pt. 3 (druid)

Posted by "FrankChen021 (via GitHub)" <gi...@apache.org>.
FrankChen021 commented on PR #19302:
URL: https://github.com/apache/druid/pull/19302#issuecomment-5225546533

   Part of #13948 — JUnit4 to JUnit5 migration.


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org