pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] sijie commented on a change in pull request #3168: Refactor api commands
Date Thu, 20 Dec 2018 03:22:20 GMT
sijie commented on a change in pull request #3168: Refactor api commands
URL: https://github.com/apache/pulsar/pull/3168#discussion_r243146228
 
 

 ##########
 File path: pulsar-functions/worker/src/test/java/org/apache/pulsar/functions/worker/rest/api/v2/SinkApiV2ResourceTest.java
 ##########
 @@ -236,13 +253,18 @@ public void testRegisterSinkMissingPackage() throws IOException {
             topicsToSerDeClassName,
             null,
             parallelism,
-                null,
-                "Sink Package is not provided");
+                null
+            );
+        } catch (RestException re){
+            assertEquals(re.getResponse().getStatusInfo(), Response.Status.BAD_REQUEST);
+            throw re;
+        }
     }
 
-    @Test
-    public void testRegisterSinkMissingPackageDetails() throws IOException {
-        testRegisterSinkMissingArguments(
+    @Test(expectedExceptions = RestException.class, expectedExceptionsMessageRegExp = "zip
file is empty")
 
 Review comment:
   keep all assertions in one place.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

Mime
View raw message