sijie commented on a change in pull request #3168: Refactor api commands
URL: https://github.com/apache/pulsar/pull/3168#discussion_r243146257
 
 

 ##########
 File path: 
pulsar-functions/worker/src/test/java/org/apache/pulsar/functions/worker/rest/api/v2/SinkApiV2ResourceTest.java
 ##########
 @@ -267,13 +294,18 @@ public void testRegisterSinkInvalidJarNoSink() throws 
IOException {
                 topicsToSerDeClassName,
                 null,
                 parallelism,
-                null,
-                "Failed to extract sink class from archive");
+                null
+            );
+        } catch (RestException re){
+            assertEquals(re.getResponse().getStatusInfo(), 
Response.Status.BAD_REQUEST);
+            throw re;
+        }
     }
 
-    @Test
-    public void testRegisterSinkNoInput() throws IOException {
-        testRegisterSinkMissingArguments(
+    @Test(expectedExceptions = RestException.class, 
expectedExceptionsMessageRegExp = "Must specify at least one topic of input via 
topicToSerdeClassName, topicsPattern, topicToSchemaType or inputSpecs")
 
 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:
[email protected]


With regards,
Apache Git Services

Reply via email to