Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CF538200BF1 for ; Tue, 3 Jan 2017 14:43:59 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CDF88160B43; Tue, 3 Jan 2017 13:43:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 48438160B33 for ; Tue, 3 Jan 2017 14:43:59 +0100 (CET) Received: (qmail 11472 invoked by uid 500); 3 Jan 2017 13:43:58 -0000 Mailing-List: contact dev-help@sqoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sqoop.apache.org Delivered-To: mailing list dev@sqoop.apache.org Received: (qmail 11458 invoked by uid 99); 3 Jan 2017 13:43:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jan 2017 13:43:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 4FC442C0453 for ; Tue, 3 Jan 2017 13:43:58 +0000 (UTC) Date: Tue, 3 Jan 2017 13:43:58 +0000 (UTC) From: "Boglarka Egyed (JIRA)" To: dev@sqoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SQOOP-3090) Normalize test cases where expect an exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 03 Jan 2017 13:44:00 -0000 [ https://issues.apache.org/jira/browse/SQOOP-3090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15795092#comment-15795092 ] Boglarka Egyed commented on SQOOP-3090: --------------------------------------- I have found some more affected test classes: * TestClassWriter * LobFileStressTest * TestIncrementalImport * TestRecordParser * TestSavedJobs I'm opening a third subtask for them since the review of the other two tickets is in a far gone state. > Normalize test cases where expect an exception > ---------------------------------------------- > > Key: SQOOP-3090 > URL: https://issues.apache.org/jira/browse/SQOOP-3090 > Project: Sqoop > Issue Type: Improvement > Affects Versions: 1.4.6 > Reporter: Boglarka Egyed > Assignee: Boglarka Egyed > Priority: Minor > > Many test cases uses the following logic to test if an exception has been thrown: > {code:java} > try { > > fail("Expected exception"); > } catch (someException e) { > // expected > } > } > {code} > This form is not self-explanatory enough and could be replaced by a one line ExpectedException check which would be more clean. -- This message was sent by Atlassian JIRA (v6.3.4#6332)