Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9DA4410C48 for ; Sat, 17 Aug 2013 00:25:49 +0000 (UTC) Received: (qmail 17962 invoked by uid 500); 17 Aug 2013 00:25:49 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 17911 invoked by uid 500); 17 Aug 2013 00:25:49 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 17839 invoked by uid 99); 17 Aug 2013 00:25:48 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Aug 2013 00:25:48 +0000 Date: Sat, 17 Aug 2013 00:25:48 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DERBY-1115) Write a test that ensures that code that translates a message id into a message does so correctly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13742754#comment-13742754 ] ASF subversion and git services commented on DERBY-1115: -------------------------------------------------------- Commit 1514927 from [~bryanpendleton] in branch 'code/trunk' [ https://svn.apache.org/r1514927 ] DERBY-6299: Improve code coverage of org.apache.derby.iapi.services.sanity This patch was contributed by Ahsan Shamsudeen (ahsan dot competition at gmail dot com) This patch removes the classes SanityManager and AssertFailure from the org.apache.derby.iapi.services.sanity package, replacing all uses of those classes with references to the same-named classes in the org.apache.derby.shared.common.sanity package. This change is a follow-on to DERBY-1115, which moved the body of these classes to the new location, but left the old classes around as wrappers. Removing the wrapper classes simplifies the code, but is not intended to have any other effect. There are no known bugs fixed by these changes, although as pointed out during review, there may be behavior changes as a result of this change. For example, code which specifies if (re instanceof AssertFailure) may have different behavior now, since it is testing for an instance of the underlying type, not an instance of the wrapper type. This change affects a large set of files, but the change itself is quite simple. Each of the files has a diff roughly like: -import org.apache.derby.iapi.services.sanity.SanityManager; +import org.apache.derby.shared.common.sanity.SanityManager; In addition to modifying the import statement in all such .java files, we are also deleting the two files D java\engine\org\apache\derby\iapi\services\sanity\AssertFailure.java D java\engine\org\apache\derby\iapi\services\sanity\SanityManager.java These two files, left over from DERBY-1115, are trivial wrappers around the same-named classes in o.a.d.shared.common.sanity package. So all we're doing, then, is following up on DERBY-1115 by fixing the import statements and removing the two wrapper classes. So it's a big change, but conceptually quite simple. > Write a test that ensures that code that translates a message id into a message does so correctly > ------------------------------------------------------------------------------------------------- > > Key: DERBY-1115 > URL: https://issues.apache.org/jira/browse/DERBY-1115 > Project: Derby > Issue Type: Improvement > Components: Test > Affects Versions: 10.6.1.0 > Reporter: David Van Couvering > Priority: Minor > Fix For: 10.6.1.0 > > Attachments: genClient1.sed, genClient2.sed, generateClientMessageTest.sh, README, TestClientMessages.java > > > After finding, in my and others' code, a number of situations where we used a message id with no matching message, or used the incorrect number of parameters for an internationalized message, I became determined to write a test that tries to track down these bugs, a kind of "i18n lint". > It's very hard, almost impossible, to test these invocations of message formatting through a normal unit test, because basically you have to write a full suite of negative tests. > This bug is a placeholder for some work I am doing to accomplish this task using code parsing rather than trying to execute negative tests. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira