You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/06/23 03:46:53 UTC

[GitHub] [pulsar] 315157973 opened a new pull request #11027: Use testng instead of junit

315157973 opened a new pull request #11027:
URL: https://github.com/apache/pulsar/pull/11027


   
   ### Motivation
   Pulsar uses TestNG, but some tests are still using junit
   
   ### Modifications
   Use testng instead of junit
   


-- 
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.

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



[GitHub] [pulsar] 315157973 commented on a change in pull request #11027: Use testng instead of junit

Posted by GitBox <gi...@apache.org>.
315157973 commented on a change in pull request #11027:
URL: https://github.com/apache/pulsar/pull/11027#discussion_r656794828



##########
File path: pulsar-functions/instance/src/test/java/org/apache/pulsar/functions/source/PulsarSourceTest.java
##########
@@ -54,7 +54,7 @@
 import org.apache.pulsar.functions.api.Record;
 import org.apache.pulsar.functions.api.SerDe;
 import org.apache.pulsar.io.core.SourceContext;
-import org.junit.Assert;
+import org.testng.Assert;

Review comment:
       Done




-- 
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.

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



[GitHub] [pulsar] lhotari commented on a change in pull request #11027: Use testng instead of junit

Posted by GitBox <gi...@apache.org>.
lhotari commented on a change in pull request #11027:
URL: https://github.com/apache/pulsar/pull/11027#discussion_r656756751



##########
File path: pulsar-functions/instance/src/test/java/org/apache/pulsar/functions/source/PulsarSourceTest.java
##########
@@ -54,7 +54,7 @@
 import org.apache.pulsar.functions.api.Record;
 import org.apache.pulsar.functions.api.SerDe;
 import org.apache.pulsar.io.core.SourceContext;
-import org.junit.Assert;
+import org.testng.Assert;

Review comment:
       Please check the order of arguments for assertEquals. In junit, the 1st argument is the expected to value and 2nd is the actual value. In TestNG's assertEquals the order is swapped. 1st argument is the actual value and 2nd is the expected value. There the same difference in assertSame method.
   
   There are a few usages of assertEquals and assertSame in this file. Please fix the parameter order.




-- 
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.

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



[GitHub] [pulsar] 315157973 commented on a change in pull request #11027: Use testng instead of junit

Posted by GitBox <gi...@apache.org>.
315157973 commented on a change in pull request #11027:
URL: https://github.com/apache/pulsar/pull/11027#discussion_r656803237



##########
File path: pulsar-metadata/src/test/java/org/apache/pulsar/metadata/BacklogQuotaCompatibilityTest.java
##########
@@ -26,7 +26,7 @@
 
 import java.io.IOException;
 
-import static org.junit.Assert.assertEquals;
+import static org.testng.Assert.assertEquals;

Review comment:
       This was originally wrong, but it was correct after using testng




-- 
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.

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



[GitHub] [pulsar] sijie merged pull request #11027: Use testng instead of junit

Posted by GitBox <gi...@apache.org>.
sijie merged pull request #11027:
URL: https://github.com/apache/pulsar/pull/11027


   


-- 
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.

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



[GitHub] [pulsar] 315157973 commented on a change in pull request #11027: Use testng instead of junit

Posted by GitBox <gi...@apache.org>.
315157973 commented on a change in pull request #11027:
URL: https://github.com/apache/pulsar/pull/11027#discussion_r656821502



##########
File path: pulsar-metadata/src/test/java/org/apache/pulsar/metadata/BacklogQuotaCompatibilityTest.java
##########
@@ -26,7 +26,7 @@
 
 import java.io.IOException;
 
-import static org.junit.Assert.assertEquals;
+import static org.testng.Assert.assertEquals;

Review comment:
       @hangc0276 PTAL




-- 
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.

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



[GitHub] [pulsar] 315157973 commented on a change in pull request #11027: Use testng instead of junit

Posted by GitBox <gi...@apache.org>.
315157973 commented on a change in pull request #11027:
URL: https://github.com/apache/pulsar/pull/11027#discussion_r656802124



##########
File path: pulsar-metadata/src/test/java/org/apache/pulsar/metadata/BacklogQuotaCompatibilityTest.java
##########
@@ -26,7 +26,7 @@
 
 import java.io.IOException;
 
-import static org.junit.Assert.assertEquals;
+import static org.testng.Assert.assertEquals;

Review comment:
       Already swapped




-- 
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.

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



[GitHub] [pulsar] hangc0276 commented on a change in pull request #11027: Use testng instead of junit

Posted by GitBox <gi...@apache.org>.
hangc0276 commented on a change in pull request #11027:
URL: https://github.com/apache/pulsar/pull/11027#discussion_r656801102



##########
File path: pulsar-metadata/src/test/java/org/apache/pulsar/metadata/BacklogQuotaCompatibilityTest.java
##########
@@ -26,7 +26,7 @@
 
 import java.io.IOException;
 
-import static org.junit.Assert.assertEquals;
+import static org.testng.Assert.assertEquals;

Review comment:
       Please take care of assertEquals order




-- 
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.

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