From commits-return-19359-archive-asf-public=cust-asf.ponee.io@pulsar.apache.org Thu Dec 20 04:22:27 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 277E11807AC for ; Thu, 20 Dec 2018 04:22:24 +0100 (CET) Received: (qmail 99209 invoked by uid 500); 20 Dec 2018 03:22:22 -0000 Mailing-List: contact commits-help@pulsar.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pulsar.apache.org Delivered-To: mailing list commits@pulsar.apache.org Received: (qmail 98637 invoked by uid 99); 20 Dec 2018 03:22:21 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Dec 2018 03:22:21 +0000 From: GitBox To: commits@pulsar.apache.org Subject: [GitHub] sijie commented on a change in pull request #3168: Refactor api commands Message-ID: <154527614060.4665.14435721130906380331.gitbox@gitbox.apache.org> Date: Thu, 20 Dec 2018 03:22:20 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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