sijie commented on a change in pull request #3168: Refactor api commands
URL: https://github.com/apache/pulsar/pull/3168#discussion_r243146332
##########
File path:
pulsar-functions/worker/src/test/java/org/apache/pulsar/functions/worker/rest/api/v2/SinkApiV2ResourceTest.java
##########
@@ -478,58 +531,64 @@ public void testRegisterSinkConflictingFields() throws
Exception {
null,
new Gson().toJson(sinkConfig),
null);
- assertEquals(Status.OK.getStatusCode(), response.getStatus());
}
- @Test
+ @Test(expectedExceptions = RestException.class,
expectedExceptionsMessageRegExp = "sink failed to register")
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